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

Load deferred providers before provider registration #86

Merged
merged 4 commits into from
Jun 25, 2022

Conversation

bennothommo
Copy link
Member

Implements laravel/framework#38724 into the Winter codebase, extending the base Laravel ProviderRepository class and overriding the load method. Reverts dff4e6e and partially reverts 6d95046.

This PR will override the base provider loading functionality to record deferred providers before registering any eager loaded providers. This allows eager loaded providers to use deferred provider functionality (such as the Cache provider). In this method, this will technically make those providers eager loaded as well, but these providers will be deferred if no other provider uses them in registration.

Thought it was going to be needed for the tests, but ended up not needing it.
Copy link
Member

@LukeTowers LukeTowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bennothommo if you've tested with the latest 1.2 of the system module and it works fine in the web environment I'm happy to have this merged, seems like a pretty great solution!

@LukeTowers LukeTowers merged commit a0feccb into wip/1.2 Jun 25, 2022
@LukeTowers LukeTowers deleted the wip/1.2-load-deferred-before-registration branch June 25, 2022 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants