mardi 29 mars 2016

Uncaught exception 'ReflectionException' with message 'Class App\Console\Kernel does not exist'

I never have any problem running composer install

But this morning, I ran into this error :

PHP Fatal error:  Uncaught exception 'ReflectionException' with message 'Class App\Console\Kernel does not exist' in /usr/share/nginx/ssc-portal/vendor/laravel/framework/src/Illuminate/Container/Container.php:741
Stack trace:
#0 /usr/share/nginx/ssc-portal/vendor/laravel/framework/src/Illuminate/Container/Container.php(741): ReflectionClass->__construct('App\\Console\\Ker...')
#1 /usr/share/nginx/ssc-portal/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('App\\Console\\Ker...', Array)
#2 /usr/share/nginx/ssc-portal/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('App\\Console\\Ker...', Array)
#3 /usr/share/nginx/ssc-portal/vendor/laravel/framework/src/Illuminate/Container/Container.php(220): Illuminate\Foundation\Application->make('App\\Console\\Ker...', Array)
#4 /usr/share/nginx/ssc-portal/vendor/laravel/framework/src/Illuminate/Container/Container.php(738): Illuminate\Container\Container->Illuminate\Cont in /usr/share/nginx/ssc-portal/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 741


Here is my composer.json

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "illuminate/html": "^5.0",
        "laracasts/utilities": "~2.0",
        "barryvdh/laravel-debugbar": "^2.0",
        "sammyk/laravel-facebook-sdk": "~3.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "phpspec/phpspec": "~2.1"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "App/",
            "Helpers\\": "App/Helpers/"
        },
        "files": ["app/Helper.php"]
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "pre-update-cmd": [
        ],
        "post-update-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}


Did I do anything wrong ? Did I forget to run any commands ?

Any hints / suggestions on this will be much appreciated !



via Chebli Mohamed

1 commentaire:

steph a dit…

I have the same problem, try use composer dump-autoload and then composer update, but not work for me

Enregistrer un commentaire