Fatal error updating Laravel 5.1 to 5.2

I follow the official update guide from 5.1 to 5.2. The first section says:

If you are installing Laravel 5.2 beta, add "minimum-stability": "beta" to your composer.json file.

Update the composer.json file to point to laravel/framework 5.2.* .

Add symfony/dom-crawler ~3.0 and symfony/css-selector ~3.0 to require-dev of your composer.json file.

Now, after entering the specified changes and running composer update , I get the following errors:

 PHP Fatal error: Class 'Illuminate\Routing\ControllerServiceProvider' not found in /home/vagrant/Code/myproject/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146 

and

 [Symfony\Component\Debug\Exception\FatalErrorException] Class 'Illuminate\Routing\ControllerServiceProvider' not found 

and

 [RuntimeException] Error Output: PHP Fatal error: Class 'Illuminate\Routing\ControllerServiceProvider' not found in /home/vagrant/Code/myproject/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146 

Errors are issued after the update is completed, and "Create startup files" occurs.

What could be wrong?

This does not seem to be a problem with a custom package, but the main one. Should I continue with the upgrade guide and run composer update AFTER everything has been configured according to the new version of the framework?

UPDATE

Running composer dump-autoload after that does not composer dump-autoload errors described above. However, it is still confusing.

+48
Dec 21 '15 at 11:55
source share
5 answers

No longer Illuminate\Routing\ControllerServiceProvider .

If I were you, I would compare the application project with https://github.com/laravel/laravel/commits/develop , for example, if you look at https://github.com/laravel/laravel/blob/develop/config/app.php , you will see the 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, 
+53
Dec 21 '15 at 13:16
source share

When upgrading from 5.1 to 5.2 in existing projects, we found that running composer update before and after deleting rows for providers

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

was the necessary sequence to complete the laravel update.

Running before this will allow laravel to download and update the current library library dependencies and then run after uninstall (the composer was able to execute without problems)

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

+17
Jan 06 '16 at 17:37
source share

Remove two service providers from config / app.php

 Illuminate\Foundation\Providers\ArtisanServiceProvider::class, Illuminate\Routing\ControllerServiceProvider::class, 
+16
Feb 04 '16 at 11:59
source share

Updating the app.php file in config / solves one problem, but with the introduction of the bootstrap / cache folder, you probably continue to work with the same error.

I launched an update for the composer. Before deleting the cached file, I continued to beat the same error. First of all, make sure that you first delete the bootstrap / cache / services.php file.

There may be a team of masters for this, but I completely skipped this step in the documentation.

+7
Jan 11 '16 at 0:46
source share

I found a solution here:

https://laravel.com/docs/5.2/upgrade#upgrade-5.2.0

Service providers

Illuminate \ Foundation \ Providers \ ArtisanServiceProvider should be removed from the list of service providers in the app.php configuration file.

Illuminate \ Routing \ ControllerServiceProvider should be removed from the list of service providers in the app.php configuration file.

+1
Aug 21 '16 at 13:13
source share



All Articles