Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 63cdc32

Browse files
committed
Added 3.0.0 changelog
1 parent 1a142df commit 63cdc32

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

CHANGELOG.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,86 @@
22

33
All notable changes to this project will be documented in this file, in reverse chronological order by release.
44

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+
54+
### Deprecated
55+
56+
- Nothing.
57+
58+
### Removed
59+
60+
- `GlobalEventManager` and `StaticEventManager` are removed (with prejudice!).
61+
- `ProvidesEvents`, which was previously deprecated, is removed.
62+
- `EventManagerInterface::setSharedManager()` is removed. Shared managers are
63+
now expected to be injected during instantiation.
64+
- `EventManagerInterface::getEvents()` and `getListeners()` are removed; they
65+
had now purpose within the implementation.
66+
- `EventManagerInterface::setEventClass()` was renamed to `setEventPrototype()`,
67+
which now expects an `EventInterface` instance. That instance will be cloned
68+
whenever a new event is created.
69+
- `EventManagerInterface::attachAggregate()` and `detachAggregate()` are
70+
removed. Users should use the `attach()` and `detach()` methods of the
71+
aggregates themselves.
72+
- `SharedEventAggregateAwareInterface` and `SharedListenerAggregateInterface`
73+
are removed. This was an undocumented and largely unused feature.
74+
- `SharedEventManagerAwareInterface` is removed. A new interface,
75+
`SharedEventsCapableInterface` defines the `getSharedManager()` method from
76+
the interface, and `EventManagerInterface` extends that new interface.
77+
- `SharedEventManagerInterface::getEvents()` is removed, as it had no purpose in
78+
the implementation.
79+
- `ResponseCollection::setStopped()` no longer implements a fluent interface.
80+
81+
### Fixed
82+
83+
- `FilterIterator::insert()` has been modified to raise an exception if the value provided is not a callable.
84+
585
## 2.6.0 - TBD
686

787
### Added

0 commit comments

Comments
 (0)