-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Dont register routes and middleware if we are not in debug mode #906
Conversation
We are using the debugbar in a staging environment without I've been thinking about making a PR with something like LaravelDebugbar::isEnabled to check |
Good catch. - if (!$this->app['config']->get('app.debug')) {
+ if (!app('debugbar')->isEnabled()) { @barryvdh your call. I can send a PR for this. |
@vkarampinis, unfortunately that would break enabling it at runtime. |
This also renders config's "enabled" obsolete as it cannot actually be overriden. |
Should we just revert this? |
@barryvdh, I think it's better to do so. Registering those routes and the middleware doesn't look like a big performance issue so I don't see a reason why we shouldn't register those. |
Reverted |
@barryvdh Please make new release with this fix. I'm using 3.2.3 and it's not reverted in this release |
done |
ServiceProvider as is now, register routes and middleware even when we are not on debug mode
APP_DEBUG=false
This patch allows ServiceProvider to boot only when
app.debug
isTRUE