Skip to content

compat(l13): allow illuminate/support ^13 + Dispatcher fire()->dispatch() - #2

Open
agissept wants to merge 3 commits into
masterfrom
compat/l13-support-13
Open

agissept wants to merge 3 commits into
masterfrom
compat/l13-support-13

Conversation

@agissept

Copy link
Copy Markdown
Member

Unblocks the dicoding.com L42x→L13 migration. Fork laravel/framework 4.2.100 swaps
illuminate/support (and the SCC-1 cluster) to v13, conflicting with commander's
illuminate/support: ~4.0 pin and its use of the removed Dispatcher::fire().

  • composer.json: illuminate/support ~4.0~4.0 || ^13.
  • EventDispatcher: $this->event->fire(...)->dispatch(...) (v13 removed fire()).

The app pins dev-compat/l13-support-13 until this merges to master.

agissept and others added 3 commits September 18, 2026 17:29
…ch()

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nature

L13's event dispatcher calls wildcard listeners as (eventName, payload) instead of
passing the event object directly. Accept both and unwrap payload[0] so whenX()
handlers keep receiving the domain event object (previously ReflectionClass got the
dotted event name and threw).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…unc_get_args

Reverts the 2-param signature (broke every subclass override). Base stays handle($event);
uses func_get_args() + a reusable unwrapEvent() helper so subclasses overriding handle()
stay signature-compatible and can unwrap the L13 wildcard (eventName, payload) themselves.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant