vendredi 25 décembre 2015

Laravel 5.1 to 5.2 upgrade error

When I try to update our existing project from Laravel 5.1 to Laravel 5.2 using the official guide, I get an error after composer update when the post update

php artisan clear-compiled

is run. Here is the error.

Class Illuminate\Foundation\Composer does not exist

Has anyone had a similar problem? When I run composer update with the no scripts flag it updates regularly so it's a problem on the clear-compiled.

Below are my Service Providers and my composer.json file.

Service Providers

    Illuminate\Auth\AuthServiceProvider::class,
    Illuminate\Broadcasting\BroadcastServiceProvider::class,
    Illuminate\Bus\BusServiceProvider::class,
    Illuminate\Cache\CacheServiceProvider::class,
    Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
    Illuminate\Cookie\CookieServiceProvider::class,
    Illuminate\Database\DatabaseServiceProvider::class,
    Illuminate\Encryption\EncryptionServiceProvider::class,
    Illuminate\Filesystem\FilesystemServiceProvider::class,
    Illuminate\Foundation\Providers\FoundationServiceProvider::class,
    Illuminate\Hashing\HashServiceProvider::class,
    Illuminate\Mail\MailServiceProvider::class,
    Illuminate\Pagination\PaginationServiceProvider::class,
    Illuminate\Pipeline\PipelineServiceProvider::class,
    Illuminate\Queue\QueueServiceProvider::class,
    // Illuminate\Redis\RedisServiceProvider::class,
    Vetruvet\PhpRedis\PhpRedisServiceProvider::class,
    Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
    Illuminate\Session\SessionServiceProvider::class,
    Illuminate\Translation\TranslationServiceProvider::class,
    Illuminate\Validation\ValidationServiceProvider::class,
    Illuminate\View\ViewServiceProvider::class,
    Collective\Html\HtmlServiceProvider::class,
    Laravel\Socialite\SocialiteServiceProvider::class,
    Intervention\Image\ImageServiceProvider::class,
    Torann\GeoIP\GeoIPServiceProvider::class,
    Jenssegers\Agent\AgentServiceProvider::class,
    Barryvdh\Debugbar\ServiceProvider::class,

composer.json

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.2.*",
    "fzaninotto/faker": "^1.6@dev",
    "laravelcollective/html": "5.2.*",
    "laravelcollective/remote": "~5.2",
    "kriswallsmith/assetic": "^1.3@dev",
    "pda/pheanstalk": "^3.0@dev",
    "aws/aws-sdk-php-laravel": "~3.0",
    "illuminate/http": "~5.2",
    "illuminate/session": "~5.2",
    "illuminate/support": "~5.2",
    "nesbot/carbon": "~1.18",
    "guzzlehttp/guzzle": "~5.3|~6.0",
    "vetruvet/laravel-phpredis": "dev-master",
    "predis/predis": "^1.1@dev",
    "laravel/socialite": "^3.0@dev",
    "intervention/image": "^2.3@dev",
    "brightcove/api": "^1.0@dev",
    "torann/geoip": "dev-master",
    "graham-campbell/throttle": "~5.1",
    "jenssegers/agent": "^3.0@dev"
},
"require-dev": {
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "phpspec/phpspec": "~2.1",
    "symfony/dom-crawler": "~3.0",
    "symfony/css-selector": "~3.0",
    "barryvdh/laravel-debugbar": "^2.0@dev",
    "laracasts/generators": "dev-master"
},
"repositories": [
    {
        "type": "git",
        "url": "http://ift.tt/1kjP669"
    }
],
"autoload": {
    "classmap": [
        "database",
        "app/Models",
        "app/Footgoll"
    ],
    "files": [
        "app/helpers.php"
    ],
    "psr-4": {
        "Myapp\\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "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"
},
"minimum-stability": "dev",
"prefer-stable": true
}



via Chebli Mohamed

1 commentaire:

Unknown a dit…

I have also faced same error during laravel version upgrade form 5.1 to 5.2. This problem is because, laracasts/generators has no support for laravel 5.2. So I have solved this problem by removing laracasts/generators from require-dev in composer.json file.

Enregistrer un commentaire