Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork473
Allow tagging entity listeners#222
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
This allows tagging a service with an 'doctrine.orm.entity_listener'tag. These tagged services will automatically be registered with theentity listener resolver.Note: The changes to the XML fixture cannot be parsed due to a bug inthe Symfony DependencyInjection component. A PR that fixes this issuecan be found atsymfony/symfony#9350. When thatPR has been merged, all tests in this commit pass.
sandermarechal commentedOct 21, 2013
I could also write an alternative to this PM. Instead of tagging services and registering them with the default Doctrine EntityListenerResolver, we could also supply a custom resolver that knows about the DIC. In that case, there would be no need to tag services, but you would specify the service ID instead of a class name in the EntityListener mapping. |
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 is wrong. The default entity manager can have any name. We don't enforce it being nameddefault (default is just the name we use when using the compact configuration format)
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.
Fixed
matteosister commentedOct 24, 2013
👍 |
sandermarechal commentedOct 25, 2013
I have updated the test fixture so that this does not have to wait onsymfony/symfony#9350. All tests pass now. |
robbixc commentedOct 25, 2013
looking forward to this feature 👍 |
sandermarechal commentedNov 8, 2013
BenjaminPaap commentedNov 21, 2013
👍 need this feature too |
Allow tagging entity listeners
This allows tagging a service with an 'doctrine.orm.entity_listener'
tag. These tagged services will automatically be registered with the
entity listener resolver.
Note: The changes to the XML fixture cannot be parsed due to a bug in
the Symfony DependencyInjection component. A PR that fixes this issue
can be found atsymfony/symfony#9350. When that
PR has been merged, all tests in this commit pass.