Issue
Working with envoy in laravel 5.7 on production server I run composer with --no-dev keys:
@task( 'composer', ['on'=>$on] )
cd {{ $release_number }}
composer install --no-interaction --no-dev --prefer-dist
As I do not need dev part on production.
But I see error in envoy output:
lardeployer@NN.NNN.N.NN]: > @php artisan package:discover
[lardeployer@NN.NNN.N.NN]: In ProviderRepository.php line 208:
[lardeployer@NN.NNN.N.NN]: Class 'Barryvdh\Debugbar\ServiceProvider' not found
[lardeployer@NN.NNN.N.NN]: Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
In my config/app.php file I see :
'providers' => [
...
Barryvdh\Debugbar\ServiceProvider::class,
I think that this definition raise an error. How to fix it?
Thanks!
Solution
you shouldn't put the Barryvdh\Debugbar\ServiceProvider::class
within the config/app.php
file.
as mentioned within the package doc Barryvdh here
Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
in that case, you don't need to put the Service provider within the config/app.php
file because as mentioned in the installation instruction :
The Debugbar will be enabled when APP_DEBUG is true.
you can find APP_DEBUG
within .env
file.
Answered By - Thamer
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.