v1.13.1
·
9 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Changed
EventBus::dispatch()now returns the listener failures it isolated
(array<class-string, \Throwable>, empty on full success). Isolation was
right — one broken subscriber must not stop the others — but callers had no
way to tell it apart from success, and one of them was a transactional
outbox. A mis-scoped listener threw, the bus swallowed it exactly as designed,
the outbox marked the row dispatched becausedispatch()had returned
normally, and the row was consumed and never retried: a tenant membership was
lost permanently while the table recordedstatus=1, attempts=1, last_error=NULL. Adding the value is backward compatible — every existing
$bus->dispatch($e);ignores it and behaves exactly as before — but anything
that RECORDS delivery should now check it and re-queue rather than consume.
Fixed
- A listener that could not be resolved was reported as a broken constructor.
resolveListener()caught every container failure and fell back to
new $listenerClass(). For a listener with constructor arguments that threw
ArgumentCountError, so abindInternal()binding — which the container had
already refused with aScopeViolationExceptionnaming the scope, the class
and the fix — was logged as "Too few arguments to function
…::__construct()". Every reader then went to the listener's constructor,
which was correct, instead of to the binding, which was not; the same shape
had already been misdiagnosed twice before.newis now attempted only when
it can actually succeed (a constructor with no required parameters);
otherwise the container's own exception is rethrown untouched.
What's Changed
🔄 Other Changes
- chore(homebrew): point the formula at v1.13.0 by @hakeemRash in #162
- fix(events): stop a failed dispatch from looking like a delivered one by @hakeemRash in #163
Full Changelog: v1.13.0...v1.13.1