-
-
Notifications
You must be signed in to change notification settings - Fork 455
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added EventSubscriberInterface marker interface to support autoconfiguration #1119
Conversation
This is solution for #821 right? But interface proposed in this PR looks nothing like proposals in issue. |
Nope, it's for #674 as stated in the PR description. |
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.
LGTM. I've moved this to master (2.1.x-dev) as SemVer requires the new interface to be introduced in a new minor release.
Thanks @lyrixx! 🎉 |
Brilliant in its simplicity! 👏 Would it be possible to on userland let DI alias the old interface for the new one, so without making code changes to PHP this autowiring could get used (read: tested) on our application? |
Had that one in mind, which probably is sufficient. Was more thinking of something conceptual like: Doctrine\Common\EventSubscriber:
alias: Doctrine\Bundle\DoctrineBundle\EventSubscriber\EventSubscriberInterface This in order to gain advantage of all functionality the doctrine bundle in the possible future would add via DI (e.g. tags, compiler passes) based on |
This PR was merged into the 4.4 branch. Discussion ---------- [Doctrine] Document EventSubscriberInterface `Doctrine\Bundle\DoctrineBundle\EventSubscriber\EventSubscriberInterface` was introduced in doctrine/DoctrineBundle#1119 Fixes #15234 Commits ------- e8b3b04 Add note about EventSubscriberInterface introduced in DoctrineBundle 2.1
fixes #674
By implementing
Doctrine\Bundle\DoctrineBundle\EventSubscriber\EventSubscriberInterface
, your Doctrine ORM Subscribers will be automatically configured