Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,11 @@ required** — this package ships a backwards-compatibility alias:

```diff
- "initphp/event-emitter": "^1.0",
+ "initphp/events": "^2.0"
+ "initphp/events": "^3.0"
```

Composer will not install both packages side-by-side because
`initphp/events:^2.0` declares a `replace` for `initphp/event-emitter`.
`initphp/events` declares a `replace` for `initphp/event-emitter`.

When you next touch the code, prefer the new canonical namespace:

Expand All @@ -293,12 +293,14 @@ use InitPHP\Events\EventEmitter;
```

The alias is intended as a transition aid and may be removed in a
future major release. **One important behaviour change** that comes
with v2.0: in 1.x, `EventEmitter::emit()` had a bug where the entire
listeners array was passed to `call_user_func_array` instead of each
individual listener, so emitted events silently fired no listeners at
all. That is fixed in 2.0 — if you had quietly broken `emit()` calls
in 1.x, they will now actually run their listeners.
future major release. **One behaviour change to check** if you come
from tag `1.0` of `initphp/event-emitter`: that tag's
`EventEmitter::emit()` passed the whole listeners array to
`call_user_func_array` instead of each individual listener, so emitted
events silently fired no listeners at all. `initphp/event-emitter`
`1.0.1` already fixed it and no `initphp/events` release has the bug —
if you had quietly broken `emit()` calls on tag `1.0`, they will now
actually run their listeners.

See [docs/Migration-Guide.md](docs/Migration-Guide.md)
for the full migration checklist.
Expand Down
Loading