-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Provide duck-typed PSR-14 implementation #2
Comments
Hey! Is there any plan to continue working on this? I see there was some work done on the old zendframework repo, but the pull request was not migrated to this one. I'm asking because I plan to support both laminas-eventmanager and PSR-14 in a project of mine, and having this would drastically simplify things, haha. I know there's a lot of work yet to be done in other packages, so I don't want to sound picky. I would just want to know if we are talking about a one month thing, a six month thing or a one year thing, just to decide if it's worth waiting or going with my own temporal implementation. I'm also open to help with this if there's anything I can do. |
@acelaya Well, clearly at this point, it's at least a six month thing. 🤣 I'd forgotten how much work I did on the original, and it's definitely a good starting place. I'll see if I can get some work done on it in the coming weeks, so we can get a v3 release with it in, and potentially prepare for a v4 release. |
Thanks for checking this now @weierophinney! |
This patch provides a forwards-compatibility release that adapts zend-eventmanager to work as a PSR-14 EventDispatcher. It does so by doing the following:
ListenerProviderInterface
andEventDispatcherInterface
versions that work with PHP 5.6.ListenerProvider
subnamespace; this includes both the listener attachment previously in theEventManager
instance as well as theSharedEventManager
instance.ListenerProvider
subnamespace.EventManager
to consume listener providers. By default, it will create a default priority-based listener provider, and have its various listener attachment methods proxy to that provider; it then aggregates that provider with the SharedEventManager (which is itself a provider now) in order to retrieve listeners. This is done in such a way that behavior is completely backwards compatible with current usage.createUsingListenerProvider()
, allows providing a specific listener provider for use with theEventManager
. If the provider is attachment capable, the various listener attachment methods will proxy to it; otherwise, they will raise an exception.The patch also deprecates a number of features, including:
EventInterface
.TODO
Originally posted by @weierophinney at zendframework/zend-eventmanager#73
The text was updated successfully, but these errors were encountered: