You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Service providers already have the ability to declare what it is that they provide via the $provides interface. This makes it so the container can lazy load service providers and only register the ones that are needed as part of a request potentially speeding up $app->make calls and the site significantly.
So what does a service provider look like that provides?
That's all. Now we can cache a lookup table and only register providers that need to be registered.
Considerations
Many providers are registered without the use of a "registerer" class
IE: (new CustomServiceProvider($app))->register()
These will just work as they do today. Instead we should have a simple way to push providers onto the container, maybe something like $app->provide($provider)
This may add cache level considerations
Performance is the key benefactor, this must be profiled thoroughly.
The text was updated successfully, but these errors were encountered:
Service providers already have the ability to declare what it is that they provide via the $provides interface. This makes it so the container can lazy load service providers and only register the ones that are needed as part of a request potentially speeding up $app->make calls and the site significantly.
So what does a service provider look like that provides?
That's all. Now we can cache a lookup table and only register providers that need to be registered.
Considerations
IE:
(new CustomServiceProvider($app))->register()
These will just work as they do today. Instead we should have a simple way to push providers onto the container, maybe something like
$app->provide($provider)
The text was updated successfully, but these errors were encountered: