zendframework/zend-eventmanager
Abandoned; use laminas/laminas-eventmanager. Trigger and listen to events within a PHP application
3.2.1
88M downloads/mo
#1546 most downloaded on Packagist
zendframework/zend-eventmanager
What this package is like to depend on
Last release 8 years ago
no release in 18 months
Release timing varies
gaps range from 4 weeks to 10 months
Rarely documented
notes for 14 of 71 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
71 releases · first in 2012
0 releases in the last 12 months
see the full history below
Release timeline
37 releases · Oct 2012 to Apr 2018Releases
latest 60 of 71-
3.2.125 Apr 2018Release notes
Open source →Added
- #66 adds support for PHP 7.2.
Changed
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
Release notes
Open source →Added
- #66 adds support for PHP 7.2.
Changed
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
-
3.2.011 Jul 2017Release notes
Open source →Release notes
Open source → -
3.1.019 Dec 2016Release notes
Open source →Added
- #26 publishes the documentation to https://zendframework.github.io/zend-eventmanager/
Changes
-
#17 makes a number of internal changes to how listeners are stored in order to improve performance, by as much as 10% in the scenario used in the MVC layer.
Additionally, it optimizes when the target and event arguments are injected into an event, eliminating that step entirely when either is unavailable.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
Release notes
Open source →Added
- #26 publishes the documentation to https://zendframework.github.io/zend-eventmanager/
Changes
-
#17 makes a number of internal changes to how listeners are stored in order to improve performance, by as much as 10% in the scenario used in the MVC layer.
Additionally, it optimizes when the target and event arguments are injected into an event, eliminating that step entirely when either is unavailable.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
-
3.0.118 Feb 2016Release notes
Open source →Added
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #24 updates the zend-stdlib dependency to
^2.7.3 || ^3.0, allowing either major version.
Release notes
Open source →Added
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #24 updates the
zend-stdlib dependency to
^2.7.3 || ^3.0, allowing either major version.
-
3.0.012 Jan 2016Release notes
Open source →Added
- Migration documentation was added.
- Automated benchmarks were added.
EventManager::__construct()now accepts an optionalSharedEventManagerInterfaceinstance as the first argument, and an optional array of identifiers as the second. As identifiers have no meaning without a shared manager present, they are secondary to providing the shared manager.EventManagerInterface::trigger()changes its signature totrigger($eventName, $target = null, $argv = []); each argument has exactly one possible meaning; the$eventNamecan only be a string event name. The fourth$callbackargument is removed.EventManagerInterface::triggerUntil()changes its signature totriggerUntil(callable $callback, $eventName, $target = null, $argv = null). Each argument has exactly one meaning.EventManagerInterfaceadds two new methods for triggering providedEventInterfacearguments:triggerEvent(EventInterface $event)andtriggerEventUntil(callable $callback, EventInterface $event).EventManagerInterface::attach()anddetach()change their signatures toattach($eventName, callable $listener, $priority = 1)anddetach(callable $listener, $eventName = null), respectively. Note that$eventNamecan now only be a string event name, not an array orTraversable.EventManagerInterface::setIdentifiers()andaddIdentifiers()change their signatures to each only accept an array of identifiers.SharedEventManagerInterface::getListeners()changes signature togetListeners(array $identifiers, $eventName)and now guarantees return of an array. Note that the second argument is now required.SharedEventManagerInterface::attach()changes signature toattach($identifier, $eventName, callable $listener, $priority = 1). The$identifierand$eventNamemust be strings.SharedEventManagerInterface::detach()changes signature todetach(callable $listener, $identifier = null, $eventName = null);$identifierand$eventNamemust be strings if passed.ListenerAggregateInterface::attach()adds an optional$priority = 1argument. This was used already in v2, but not dictated by the interface.FilterInterface::attach()anddetach()have changed signature toattach(callable $callback)anddetach(callable $ilter), respectively.LazyListenerallows wrapping:- fetching a listener service from a container-interop container, and
- invoking a designated listener method with the provided event.
LazyEventListenerextendsLazyListener, and provides metadata for discovering the intended event name and priority at which to attach the lazy listener; these are consumed by:LazyListenerAggregate, which, provided a list ofLazyEventListenersand/or definitions to use to create them, acts as an aggregate for attaching a number of such listeners at once.- #20 updates the
trait
Zend\EventManager\Test\EventListenerIntrospectionTraitso that the implementation will work with the v3 changes; the tests written for v2 continue to pass, allowing this trait to be used to provide compatibility testing between v2 and v3.
Deprecated
- Nothing.
Removed
GlobalEventManagerandStaticEventManagerare removed (with prejudice!).ProvidesEvents, which was previously deprecated, is removed.EventManagerInterface::setSharedManager()is removed. Shared managers are now expected to be injected during instantiation.EventManagerInterface::getEvents()andgetListeners()are removed; they had now purpose within the implementation.EventManagerInterface::setEventClass()was renamed tosetEventPrototype(), which now expects anEventInterfaceinstance. That instance will be cloned whenever a new event is created.EventManagerInterface::attachAggregate()anddetachAggregate()are removed. Users should use theattach()anddetach()methods of the aggregates themselves.SharedEventAggregateAwareInterfaceandSharedListenerAggregateInterfaceare removed. This was an undocumented and largely unused feature.SharedEventManagerAwareInterfaceis removed. A new interface,SharedEventsCapableInterfacedefines thegetSharedManager()method from the interface, andEventManagerInterfaceextends that new interface.SharedEventManagerInterface::getEvents()is removed, as it had no purpose in the implementation.ResponseCollection::setStopped()no longer implements a fluent interface.
Fixed
FilterIterator::insert()has been modified to raise an exception if the value provided is not a callable.
-
2.6.412 Dec 2017Release notes
Open source →Added
- Nothing.
Changed
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #68 fixes an issue whereby
triggerListeners()was not resetting the event instance's "stop propagation" flag before triggering listeners; this could result in all listeners for a given event being skipped in cases where the event manager instance triggers multiple events.
-
2.6.318 Feb 2016Release notes
Open source →Added
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #23 updates the requirements to allow usage with PHP 7, bumps zend-stdlib to
^2.7, and requires PHP 7 builds to pass continuous integration.
-
2.6.212 Jan 2016Release notes
Open source →Added
-
#19 adds a new trait,
Zend\EventManager\Test\EventListenerIntrospectionTrait, intended for composition in unit tests. It provides a number of methods that can be used to retrieve listeners with or without associated priority, and the assertionassertListenerAtPriority(callable $listener, $priority, $event, EventManager $events, $message = ''), which can be used for testing that a listener was registered at the specified priority with the specified event.The features in this patch are intended to facilitate testing against both version 2 and version 3 of zend-eventmanager, as it provides a consistent API for retrieving lists of events and listeners between the two versions.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
-
-
2.6.106 Oct 2015Nothing published for this version
-
2.6.029 Sep 2015Release notes
Open source →Added
- Added
Zend\EventManager\SharedEventsCapableInterface. This interface will largely replaceZend\EventManager\SharedEventManagerAwareInterfacein version 3, and the latter was updated to extend it. - Added
EventManager::triggerEvent(EventInterface $event)as a forwards-compatibility feature. - Add
EventManager::triggerEventUntil(callable $callback, EventIterface $event)as a forwards-compatibility feature. - Adds Athletic benchmarks to aid in gauging performanc impact of changes; these are a development change only.
Deprecated
- Marked
GlobalEventManageras deprecated; this class will be removed in version 3. - Marked
StaticEventManageras deprecated; this class will be removed in version 3. - Marked
SharedListenerAggregateInterfaceas deprecated; this interface will be removed in version 3. - Marked
SharedEventAggregateAwareInterfaceas deprecated; this interface will be removed in version 3. - Marked
SharedEventManagerAwareInterfaceas deprecated; this interface will be removed in version 3. - Marked
EventManager::setSharedManager()as deprecated; this method will be removed in version 3. - Marked
EventManager::unsetSharedManager()as deprecated; this method will be removed in version 3. - Marked
EventManagerInterface::andEventManager::getEvents()as deprecated; this method will be removed in version 3. - Marked
EventManagerInterface::andEventManager::getListeners()as deprecated; this method will be removed in version 3. - Marked
EventManagerInterface::andEventmanager::setEventClass()as deprecated; this method is renamed tosetEventPrototype(EventInterface $event)in version 3. - Marked
EventManagerInterface::andEventManager::attachAggregate()as deprecated; this method will be removed in version 3. - Marked
EventManagerInterface::andEventManager::detachAggregate()as deprecated; this method will be removed in version 3. - Marked
SharedEventManagerInterface::andSharedEventManager::getEvents()as deprecated; this method will be removed in version 3.
Removed
- Nothing.
Fixed
- Nothing.
- Added
-
2.5.216 Jul 2015Release notes
Open source →Added
- #5 adds a number of unit tests to improve test coverage, and thus maintainability and stability.
Deprecated
- Nothing.
Removed
- #3 removes some
PHP 5.3- and 5.4-isms (such as marking Traits as requiring 5.4, and closing
over a copy of
$this) from the test suite.
Fixed
- #5 fixes a bug in
FilterIteratorthat occurs when attempting to extract from an empty heap.
-
2.5.103 Jun 2015Nothing published for this version
-
2.5.003 Jun 2015Nothing published for this version
-
2.4.1307 May 2015 -
2.4.12no date -
2.4.11no date -
2.4.10no date -
2.4.9no dateNothing published for this version
-
2.4.8no dateNothing published for this version
-
2.4.7no dateNothing published for this version
-
2.4.6no dateNothing published for this version
-
2.4.5no dateNothing published for this version
-
2.4.4no dateNothing published for this version
-
2.4.3no dateNothing published for this version
-
2.4.2no dateNothing published for this version
-
2.4.1no dateNothing published for this version
-
2.4.023 Mar 2015Nothing published for this version
-
2.3.913 Jan 2015Nothing published for this version
-
2.3.8no dateNothing published for this version
-
2.3.7no dateNothing published for this version
-
2.3.6no dateNothing published for this version
-
2.3.5no dateNothing published for this version
-
2.3.4no dateNothing published for this version
-
2.3.311 Aug 2014Nothing published for this version
-
2.3.2no dateNothing published for this version
-
2.3.115 Apr 2014Nothing published for this version
-
2.3.012 Mar 2014Nothing published for this version
-
2.2.1005 Mar 2014Nothing published for this version
-
2.2.9no dateNothing published for this version
-
2.2.8no dateNothing published for this version
-
2.2.7no dateNothing published for this version
-
2.2.6no dateNothing published for this version
-
2.2.531 Oct 2013Nothing published for this version
-
2.2.421 Aug 2013Nothing published for this version
-
2.2.3no dateNothing published for this version
-
2.2.222 Jul 2013Nothing published for this version
-
2.2.112 Jun 2013Nothing published for this version
-
2.2.010 May 2013Nothing published for this version
-
2.1.617 Apr 2013Nothing published for this version
-
2.1.5no dateNothing published for this version
-
2.1.413 Mar 2013Nothing published for this version
-
2.1.319 Feb 2013Nothing published for this version
-
2.1.2no dateNothing published for this version
-
2.1.106 Feb 2013Nothing published for this version
-
2.1.029 Jan 2013Nothing published for this version
-
2.0.826 Jan 2013Nothing published for this version
-
2.0.7no dateNothing published for this version
-
2.0.619 Dec 2012Nothing published for this version
-
2.0.520 Nov 2012Nothing published for this version
-
2.0.4no dateNothing published for this version