|
2 | 2 |
|
3 | 3 | All notable changes to this project will be documented in this file, in reverse chronological order by release.
|
4 | 4 |
|
| 5 | +## 3.0.0 - TBD |
| 6 | + |
| 7 | +### Added |
| 8 | + |
| 9 | +- [Migration documentation](doc/book/migration/) was added. |
| 10 | +- [Automated benchmarks](benchmarks/) were added. |
| 11 | +- `EventManager::__construct()` now accepts an optional |
| 12 | + `SharedEventManagerInterface` instance as the first argument, and an optional |
| 13 | + array of identifiers as the second. As identifiers have no meaning without a |
| 14 | + shared manager present, they are secondary to providing the shared manager. |
| 15 | +- `EventManagerInterface::trigger()` changes its signature to |
| 16 | + `trigger($eventName, $target = null, $argv = [])`; each argument has exactly |
| 17 | + one possible meaning; the `$eventName` can only be a string event name. The |
| 18 | + fourth `$callback` argument is removed. |
| 19 | +- `EventManagerInterface::triggerUntil()` changes its signature to |
| 20 | + `triggerUntil(callable $callback, $eventName, $target = null, $argv = null)`. |
| 21 | + Each argument has exactly one meaning. |
| 22 | +- `EventManagerInterface` adds two new methods for triggering provided |
| 23 | + `EventInterface` arguments: `triggerEvent(EventInterface $event)` and |
| 24 | + `triggerEventUntil(callable $callback, EventInterface $event)`. |
| 25 | +- `EventManagerInterface::attach()` and `detach()` change their signatures to |
| 26 | + `attach($eventName, callable $listener, $priority = 1)` and `detach(callable |
| 27 | + $listener, $eventName = null)`, respectively. Note that `$eventName` can now |
| 28 | + only be a string event name, not an array or `Traversable`. |
| 29 | +- `EventManagerInterface::setIdentifiers()` and `addIdentifiers()` change their |
| 30 | + signatures to each only accept an *array* of identifiers. |
| 31 | +- `SharedEventManagerInterface::getListeners()` changes signature to |
| 32 | + `getListeners(array $identifiers, $eventName)` and now guarantees return of an |
| 33 | + array. Note that the second argument is now *required*. |
| 34 | +- `SharedEventManagerInterface::attach()` changes signature to |
| 35 | + `attach($identifier, $eventName, callable $listener, $priority = 1)`. The |
| 36 | + `$identifier` and `$eventName` **must** be strings. |
| 37 | +- `SharedEventManagerInterface::detach()` changes signature to `detach(callable |
| 38 | + $listener, $identifier = null, $eventName = null)`; `$identifier` and |
| 39 | + `$eventName` **must** be strings if passed. |
| 40 | +- `ListenerAggregateInterface::attach()` adds an optional `$priority = 1` |
| 41 | + argument. This was used already in v2, but not dictated by the interface. |
| 42 | +- `FilterInterface::attach()` and `detach()` have changed signature to |
| 43 | + `attach(callable $callback)` and `detach(callable $ilter)`, respectively. |
| 44 | +- `LazyListener` allows wrapping: |
| 45 | + - fetching a listener service from a container-interop container, and |
| 46 | + - invoking a designated listener method with the provided event. |
| 47 | +- `LazyEventListener` extends `LazyListener`, and provides metadata for |
| 48 | + discovering the intended event name and priority at which to attach the lazy |
| 49 | + listener; these are consumed by: |
| 50 | +- `LazyListenerAggregate`, which, provided a list of `LazyEventListeners` and/or |
| 51 | + definitions to use to create them, acts as an aggregate for attaching a number |
| 52 | + of such listeners at once. |
| 53 | +- [#20](https://github.com/zendframework/zend-eventmanager/pull/20) updates the |
| 54 | + trait `Zend\EventManager\Test\EventListenerIntrospectionTrait` so that the |
| 55 | + implementation will work with the v3 changes; the tests written for v2 |
| 56 | + continue to pass, allowing this trait to be used to provide compatibility |
| 57 | + testing between v2 and v3. |
| 58 | + |
| 59 | +### Deprecated |
| 60 | + |
| 61 | +- Nothing. |
| 62 | + |
| 63 | +### Removed |
| 64 | + |
| 65 | +- `GlobalEventManager` and `StaticEventManager` are removed (with prejudice!). |
| 66 | +- `ProvidesEvents`, which was previously deprecated, is removed. |
| 67 | +- `EventManagerInterface::setSharedManager()` is removed. Shared managers are |
| 68 | + now expected to be injected during instantiation. |
| 69 | +- `EventManagerInterface::getEvents()` and `getListeners()` are removed; they |
| 70 | + had now purpose within the implementation. |
| 71 | +- `EventManagerInterface::setEventClass()` was renamed to `setEventPrototype()`, |
| 72 | + which now expects an `EventInterface` instance. That instance will be cloned |
| 73 | + whenever a new event is created. |
| 74 | +- `EventManagerInterface::attachAggregate()` and `detachAggregate()` are |
| 75 | + removed. Users should use the `attach()` and `detach()` methods of the |
| 76 | + aggregates themselves. |
| 77 | +- `SharedEventAggregateAwareInterface` and `SharedListenerAggregateInterface` |
| 78 | + are removed. This was an undocumented and largely unused feature. |
| 79 | +- `SharedEventManagerAwareInterface` is removed. A new interface, |
| 80 | + `SharedEventsCapableInterface` defines the `getSharedManager()` method from |
| 81 | + the interface, and `EventManagerInterface` extends that new interface. |
| 82 | +- `SharedEventManagerInterface::getEvents()` is removed, as it had no purpose in |
| 83 | + the implementation. |
| 84 | +- `ResponseCollection::setStopped()` no longer implements a fluent interface. |
| 85 | + |
| 86 | +### Fixed |
| 87 | + |
| 88 | +- `FilterIterator::insert()` has been modified to raise an exception if the value provided is not a callable. |
| 89 | + |
5 | 90 | ## 2.6.2 - 2016-01-12
|
6 | 91 |
|
7 | 92 | ### Added
|
|
0 commit comments