Skip to content

Lacking way to order specific providers _from 3rd party_ libraries causing a big head ache #41334

Closed Answered by mikeydevelops
torian257x asked this question in Ideas
Discussion options

You must be logged in to vote

I do not think any external package for Laravel should be able to modify its bootstrap behavior.

A compromise for you is that, if you decide to publish your package, you must make the user, add your service provider manually to config/app.php providers array, since any providers specified there are loaded after any package providers.

This is how Laravel bootstraps the providers:

  1. Providers are collected from the providers array in config/app.php.
  2. Laravel then splits the array in two parts: Framework providers, User Defined Providers.
  3. Third party packages are then loaded from a package manifest previously generated from the package:discover command.
  4. The packages are then merged in the fina…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@torian257x
Comment options

@mikeydevelops
Comment options

Answer selected by torian257x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants