laravel-debugbar: Class 'Barryvdh\Debugbar\ServiceProvider' not found in \src\Illuminate\Foundation\ProviderRepository.php

Hi,

When trying to install the debugbar i faced this error running the command: php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"

Class ‘Barryvdh\Debugbar\ServiceProvider’ not found in \src\Illuminate\Foundation\ProviderRepository.php

I tried to look for this error on google but none of the solutions i found worked, i’m stuck here, any help ?

Cheers

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 22 (1 by maintainers)

Most upvoted comments

Please show us your composer.json file and make sure that you have ran composer update barryvdh/laravel-debugbar and composer dump-autoload.

I have already fix this problem. You can fix by this command: composer require barryvdh/laravel-debugbar --dev this command execute in project folder via command line After composer a barrybvh will generic C:\xampp\htdocs\am\vendor Folder

Thank

yeah ! but okay the problem solved thanks

On Jan 5, 2017 8:38 AM, “Barry vd. Heuvel” notifications@github.com wrote:

And did you add the service provider?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/barryvdh/laravel-debugbar/issues/480#issuecomment-270591260, or mute the thread https://github.com/notifications/unsubscribe-auth/AV_UpU9F_noraATVXbdT9jICr6yqrXeKks5rPKwggaJpZM4H3hUn .

Enter the boostrap/cache folder and remove all the files it contains. After removing run the command:

php artisan package:discover

The error just stops the automatic eject button - so you gotta pull the manual lever instead:

delete bootstrap/cache/config.php then run php artisan config:cache

It needs to be also removed in the providers: app/config/app.php

After:

  1. composer remove vendor/barryvdh/laravel-debugbar
  2. composer update

remove the line: Barryvdh\Debugbar\ServiceProvider in app/config/app.php.

Also these folders can be deleted:

  • app/config/packages/barryvdh/laravel-debugbar/config.php
  • another Debugbar-related file somewhere under app/storage/...

This problem also occurs if I run composer dump-autoload --optimize --no-dev The --no-dev removes all dev dependencies but it is still in the config/app.php in providers array.

Is it possible to remove debugbar from provider if APP_DEBUG is false?

I am getting this error on my publicly hosted server where I do not have a command line access. So I can’t run composer update barryvdh/laravel-debugbar and composer dump-autoload.

Is there any other way to fix this ?

Barryvdh\Debugbar\ServiceProvider::class line

remove it from app/config/app.php

composer update solved my problem

euh les gars

i have the same problem and i did composer update

barryvdh/laravel-debugbar and composer dump-autoload.

but nothing changed