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

[10.x] Fix Dispatcher::until return type #47585

Merged
merged 1 commit into from Jun 27, 2023

Conversation

Neol3108
Copy link
Contributor

It appears the until method always returns whatever gets returned from a listener or null if nothing is returned from any listener.

As you can see the until method returns the result of the dispatch method with parameter $halt = true:
https://github.com/laravel/framework/blob/10.x/src/Illuminate/Events/Dispatcher.php#L222

And the behaviour of dispatch with $halt = true is as follows:

I was considering adding a conditional return type to the dispatch method based on the halt boolean. I however thought they weren't used anywhere else in the framework and decided to omit this. Please let me know if this is wanted.

@taylorotwell taylorotwell merged commit a12d0de into laravel:10.x Jun 27, 2023
17 checks passed
@Neol3108 Neol3108 deleted the fix-until-phpdoc branch June 28, 2023 07:05
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.

None yet

2 participants