3
votes

I tried to delete barryvdh/laravel-debugbar from my laravel installation, and it seems I didn't make something right.

What I did so far :

  • composer remove barryvdh/laravel-debugbar
  • I deleted then the references in config/app.php

And I've got an error :

[RuntimeException]
Error Output: PHP Fatal error:
Class 'Barryvdh\Debugbar\ServiceProvider' not found in 
{mypath}\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php on line 146

I tried dump-autoload, clear-compiled, but none works.

What did I miss ?


22/02/2016 Edit : I also tried to remove ALL the vendor folder, then install it again via composer install, but I got the error again when the command php artisan clear-compiled was run angain.

5

5 Answers

4
votes

Ok, it seems I had played with artisan commands, and the configuration file was cached (via php artisan config:cache).

I deleted it (in bootstrap/cache/config.php) and everything works like a charm, but I also could have used the command php artisan config:clear to remove it.

3
votes

When you installed Debugbar, after the package was install via composer you needed to add the class to the providers array in config/app.php. So you need to remove this line from there:

Barryvdh\Debugbar\ServiceProvider::class

If you also register the facade, then you need to remove the following from the aliases array from the same file:

'Debugbar' => Barryvdh\Debugbar\Facade::class

If you also ran php artisan vendor:publish (which is the final step described in the Installation Section from the package readme) then you can delete the config/debugbar.php file as well, although leaving that configuration file in place will not cause any issues.

3
votes

Marc Brillault's answer is correct. I am adding more clarification to that answer:

I removed debug bar class manually from the catch files. present in (bootstrap/cache/config.php).

Steps for How to remove manually class.

1.) Open this two files 
   `bootstrap/cache/config.php`
   `config/app.php`

2.) Find this two line and remove It.        
    Barryvdh\Debugbar\ServiceProvider::class,
   'Debugbar' => Barryvdh\Debugbar\Facade::class,

3.) run command `php artisan config:clear`

after the following this step check command php artisan list is working well.

1
votes

you must:

First. Delete the references to Debugbar in config/app.php

Second. composer remove barryvdh/laravel-debugbar

In that order. If you don't, Laravel get confused ;)

0
votes

The best ways you need to do is delete all file manually in all composer files.