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

[8.x] Call the booting/booted callbacks from the container #34370

Merged
merged 1 commit into from
Sep 16, 2020
Merged

[8.x] Call the booting/booted callbacks from the container #34370

merged 1 commit into from
Sep 16, 2020

Conversation

rodrigopedra
Copy link
Contributor

This PR makes the booting/booted callbacks in a Service Provider to be called by the container, so any dependencies on those callbacks gets resolved.

This will make those methods similar to the new RouteServiceProvider's routes method, which accepts a callback that is resolved from the container.

It is also an alternative to PR #34260 by allowing to resolve dependencies from the container on RouteSeviceProvider and AuthServiceProvider which cannot change theirs' parent classes' boot methods signature.

As the callbacks were previously invoked with no parameters, I believe this is not a BC, that is why I target the 8.x branch.

@taylorotwell taylorotwell merged commit 3e4ba96 into laravel:8.x Sep 16, 2020
@rodrigopedra rodrigopedra deleted the feature-boot-from-container branch September 16, 2020 18:09
@rodrigopedra
Copy link
Contributor Author

Thanks!

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.

2 participants