samedi 2 mars 2019

Why running composer install --no-dev I got error with Barryvdh\Debugbar\ServiceProvider?

I install my laravel 5.7 app (production) at live server and with no dev tools command command I got error:

composer install --no-dev
...

  - Removing barryvdh/laravel-debugbar (v3.2.1)
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover

In ProviderRepository.php line 208:

  Class 'Barryvdh\Debugbar\ServiceProvider' not found  



Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

In my composer.json I have barryvdh/laravel-debugbar under dev block:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.1.3",
        ...
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.1",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^2.0",
        "orangehill/iseed": "^2.6",
        "phpunit/phpunit": "^7.0",
        "xethron/migrations-generator": "^2.0"
    },

In my config/app.php I have :

'providers' => [
    ...
    Barryvdh\Debugbar\ServiceProvider::class,
'aliases' => [
    ...
    'Debugbar'         => Barryvdh\Debugbar\Facade::class,

Why this error and how to fix it?

Thanks!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire