Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpKernel] Dont implement ServiceSubscriberInterface on *SessionListener#22207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
chalasr left a comment
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.
👍
fabpot commentedMar 29, 2017
I would add a note somewhere in the code or in the XML service definition to avoid breaking this again in the future. Can we also check that we don't have any other similar issues? |
nicolas-grekas commentedMar 29, 2017 via email
Note added as a test case.The other implementations of ServiceSubscriberInterface are all in bundles,where DI is already a requirement.Ready. |
| <argumenttype="service"id="container" /> | ||
| <argumenttype="service"> | ||
| <serviceclass="Symfony\Component\DependencyInjection\ServiceLocator"> | ||
| <tagname="container.service_locator" /> |
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.
AFAIK, tagging anonymous services inside an argument does not work, as this Definition is not registered directly in the container (well, I think the XMLFileLoader converts inlined definition to normal private services with a random id, which is why it works here, but creating an inlined definition in PHP would not work as it would stay inline). Should we keep it like this ?
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.
That's an issue when usingfindTaggedServiceIds, butServiceLocatorTagPass visits recursively all definitions by usingAbstractRecursivePass, so it works :)
GromNaN commentedMar 29, 2017
|
chalasr commentedMar 29, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@GromNaN These classes are abstract and missed the
The added implementations are useful on their own. A day Silex could use a PSR-11 container and remove their concrete implementations in favor of them. About the change reverted here, these classes can live without. New features are used in the core as possible, but it's not worth breaking consumers code nor forcing them to require a new component. |
stof left a comment
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.
👍
stof commentedMar 30, 2017
Status: reviewed |
fabpot commentedMar 31, 2017
Thank you@nicolas-grekas. |
…*SessionListener (nicolas-grekas)This PR was merged into the 3.3-dev branch.Discussion----------[HttpKernel] Dont implement ServiceSubscriberInterface on *SessionListener| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#22171,silexphp/Silex#1496| License | MIT| Doc PR | -Implementing `ServiceSubscriberInterface` creates a dep on the DI component, which Silex can't afford. Let's revert that part.@GromNaN can you please confirm this fixes your issue?Commits-------7cd90f5 [HttpKernel] Dont implement ServiceSubscriberInterface on *SessionListener
Uh oh!
There was an error while loading.Please reload this page.
Implementing
ServiceSubscriberInterfacecreates a dep on the DI component, which Silex can't afford. Let's revert that part.@GromNaN can you please confirm this fixes your issue?