PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, March 3, 2022

[FIXED] Envoy raise Class 'Barryvdh\Debugbar\ServiceProvider' not found?

 March 03, 2022     laravel-5     No comments   

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
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing