I have recently decided to upgrade from laravel 5.1 to 5.2. My composer.json file is as follows:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"laracasts/flash": "dev-master",
"laravelcollective/html": "5.2.0",
"intervention/image": "^2.3",
"cviebrock/image-validator": "^2.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"symfony/dom-crawler": "~3.0",
"symfony/css-selector": "~3.0"
},
"autoload": {
"classmap": [
"database"
],
"files": ["app/Http/helpers.php"],
"psr-4": {
"App\\": "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
}
My providers array in my app.php file is as follows:
'providers' => [
Illuminate\Auth\AuthServiceProvider::class,
// some more...
Illuminate\View\ViewServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
Laracasts\Flash\FlashServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,
Cviebrock\ImageValidator\ImageValidatorServiceProvider::class,
],
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
// some more...
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
'Image' => Intervention\Image\Facades\Image::class,
],
I do composer update
and get the following error:
> C:\ProgramData\ComposerSetup\bin\composer.bat update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> php artisan clear-compiled
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Illuminate\Html\HtmlServiceProvider' not found
Script php artisan clear-compiled handling the post-update-cmd event
returned with error code 255
I get the same error when I try to run php artisan serve
. I've tried all the usual stuff such as composer dump-autoload
etc.
Why is this happening and whats the fix?