-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
[Proposal] ability to specify Service Provider based on composer.json require or require-dev. #1603
Comments
Forum post: http://forums.laravel.io/viewtopic.php?pid=39771 |
I'd like to see an option for this as well. Just realized it was an issue today actually. I recall reading a something from Taylor regarding the way configurations are loaded and why it doesn't work for array type config options (eg service providers). Something to do with cascading or some other wizardry. |
I would put them in require-dev, and then in your
|
This doesn't work for me. I have this in my App::register('DayleRees\ContainerDebug\ServiceProvider');
App::register('Barryvdh\Debugbar\ServiceProvider'); and, even if i have no errors, i can't get the debug bar in there, nor i can use the Had to change my $app = App::getFacadeRoot();
$dbgbar = new \Barryvdh\Debugbar\ServiceProvider($app);
App::register( $dbgbar );
$cntdbg = new \DayleRees\ContainerDebug\ServiceProvider($app);
App::register( $cntdbg );
$dbgbar->boot();
$cntdbg->boot(); to make it work. To me, it seems a more obvious solution to have this kind of service provider registrations cascade through the various environments |
Note to @taylorotwell on @antoniofrignani comment: In 4.1 the |
But what about aliases in this case?
|
current workaround: https://github.com/percymamedy/laravel-dev-booter |
For example if I use Guard, or Generator. It mostly needed on
composer --dev
environment and not production.Current Behaviour
These so call development helpers package are great for "development purpose", however due to the way we register "provides" in
app/config/app.php
all these package need to sit underrequire
instead ofrequire-dev
.Proposed Behaviour
Have a way to detect whether current environment are for "development" or "production", or easier implementation to register array per environment so that we can make use of
require-dev
incomposer.json
.The text was updated successfully, but these errors were encountered: