Skip to content

fix(event-bus): reorder listen parameters for consistency #1291

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

Merged
merged 1 commit into from
Jun 23, 2025

Conversation

innocenzi
Copy link
Member

Closes #1290

As specified in the issue, there was an inconsistency and a DX papercut here. The first parameter was redundant with the closure's signature.

Instead of removing the $event parameter, I reordered it and made it optional, so string-based events could still be supported by this method.

@innocenzi innocenzi force-pushed the fix/event-bus-listen-signature branch from dbe3153 to 92222c9 Compare June 19, 2025 15:03
@brendt brendt merged commit 0d6e6ee into tempestphp:main Jun 23, 2025
65 checks passed
@brendt
Copy link
Member

brendt commented Jun 23, 2025

Nice!

@innocenzi innocenzi deleted the fix/event-bus-listen-signature branch June 23, 2025 11:54
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.

Inconsistent $event parameter type between Tempest\EventBus\EventBusConfig::addClosureHandler and Tempest\EventBus\GenericEventBus::listen
2 participants