Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Support unions in addon event listener discovery #11015

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

jasonvarga
Copy link
Member

@jasonvarga jasonvarga commented Oct 25, 2024

Fixes #11012

This adjusts the code to allow for unions, eg. handle(EventOne|EventTwo $event) { } which is where the error in #11012 was coming from.

It also adds support for handleWhatever(EventName $event) { } syntax, since I've lifted the code from Laravel. This is probably a lesser known thing but it works in Laravel so should here.

@jasonvarga jasonvarga merged commit 9efbb3d into 5.x Oct 28, 2024
19 checks passed
@jasonvarga jasonvarga deleted the fix-listener-discovery branch October 28, 2024 14:03
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.

Error when updating from 5.32 to 5.33
1 participant