-
Notifications
You must be signed in to change notification settings - Fork 126
Description
Description
In theory, Bugsnag laravel should work with Laravel Zero. However, the register provider flow of laravel zero, currently prevents us from using bugsnag. That flow is as follows:
- Foundation providers are registered. This includes user configured providers
- Component service providers are registered. These include the log service provider.
As a result, "Target class [log] does not exist. " error is thrown. You can't prepend the log service provider in the configuration file or anywhere else, as the component service provider simply overwrites the current binding. this doesn't give any errors when using Log facade, but doesn't log anything to bugsnag either.
Describe the solution you'd like
two things can be done:
- The current service provider becomes a deferred service provider. This would give us some performance win as we do not use the Log facade everywhere all at once. This might be a breaking change, but I am not sure.
- A Laravel Zero specific provider that is deferred and extends the main service provider.
Describe alternatives you've considered
I've posted a similar bug report at the Laravel Zero github. Maybe there a solution may come up. for instance, a way to prepend providers. Although they already have the solution, which is the deferred service provider.