Fatal error while upgrading Laravel 5.1 to 5.2 Fatal error while upgrading Laravel 5.1 to 5.2 laravel laravel

Fatal error while upgrading Laravel 5.1 to 5.2


There is no Illuminate\Routing\ControllerServiceProvider any more.

If I were you, I would compare my app project to https://github.com/laravel/laravel/commits/develop, if you for example look at https://github.com/laravel/laravel/blob/develop/config/app.php you will see default providers for Laravel 5.2:

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,Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,Illuminate\Session\SessionServiceProvider::class,Illuminate\Translation\TranslationServiceProvider::class,Illuminate\Validation\ValidationServiceProvider::class,Illuminate\View\ViewServiceProvider::class,/* * Application Service Providers... */App\Providers\AppServiceProvider::class,App\Providers\AuthServiceProvider::class,App\Providers\EventServiceProvider::class,App\Providers\RouteServiceProvider::class,


Remove the two service providers from config/app.php

Illuminate\Foundation\Providers\ArtisanServiceProvider::class, Illuminate\Routing\ControllerServiceProvider::class,


In updating from 5.1 to 5.2 on existing projects, we found that running composer update before and after the removing the lines for the providers

Illuminate\Routing\ControllerServiceProvider::class Illuminate\Foundation\Providers\ArtisanServiceProvider::class

was a necessary sequence to getting the laravel update to complete.

Running before would allow laravel to download and update the current framework library dependencies and then running after the removal (composer was able to complete without issue)

We also found that any value in the .env file cannot have spaces and must be surrounded with quotes to work.