-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
cc25d2b
to
03ba657
Compare
d72e4f5
to
ea041bf
Compare
foreach ($inactiveEnhancers as $inactiveEnhancer) { | ||
$container->removeDefinition($serviceId); | ||
unset($enhancers[$inactiveEnhancer]); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shifts the responsiblity of marking the services as private
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not do this, it'll add unexpected behaviour. (and marking all services private by default is a very good practice)
Btw, the current code doesn't work, $serviceId
will always have the same value (the last value of the previous loop) as it isn't used in this foreach loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can imagine people running into problems and we answer them with "you must mark the service as private" . But such cases should be rare, I don't care very much, will change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to remove the unused enhancers because they may contain references to services which don't exist (e.g. sonata.admin_pool
)- and I believe that will cause the container to fail.
The XSD file also has to be updated. |
|
||
</services> | ||
</container> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dd
c757e3a
to
b0a30c5
Compare
@wouterj I don't think we have one yet. |
b0a30c5
to
e118fa7
Compare
"symfony-cmf/resource": "^1.0" | ||
"symfony/options-resolver": "^2.7|3.*", | ||
"symfony-cmf/resource": "dev-admin_metadata", | ||
"puli/repository": "@beta" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we can avoid doing this. The packages minimum-stability is dev
, so the implicit Puli version is dev-master
, which is "behind" @beta
(it has Resource
instead of PuliResource
). If we remove the minimum-stability then we still need to specify the unstable @beta
version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here is that both 1.1 and 1.0 aren't stable of Puli. Our version constraint in symfony-cmf/resource
is something like ^1.0.0-betaN
. As dev versions are allowed, puli will use 1.1.0-dev
(as it's the highest dev version in the version constraint).
If we would do ~1.0.0-betaN
in symfony-cmf/resource
, things work as expected (it'll install the 1.0 dev branch and not master).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, still doesn't work. installs dev-master, at least with ^
, do you think it will work differently with ~
?
e118fa7
to
8574363
Compare
Happy for this to be merged once #29 is done (and the |
<tag name="cmf_resource.description.enhancer" alias="sonata_admin" /> | ||
</service> | ||
|
||
<service id="cmf_resource.description.enhancer.sylius_resource" class="Symfony\Cmf\Component\Resource\Description\Enhancer\Sylius\ResourceEnhancer"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make all these services private.
8574363
to
85b89fd
Compare
Updated |
85b89fd
to
157423c
Compare
@wouterj good to merge? |
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
|
||
<parameters> | ||
<parameter key="cmf_resource.registry.container.class"></parameter> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be removed
Integrates description enhancers (replaces #26 ).