Laravel 5.2 上缺少“Illuminate\Routing\ControllerServiceProvider”类

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34590797/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 12:58:24  来源:igfitidea点击:

Missing 'Illuminate\Routing\ControllerServiceProvider' class on Laravel 5.2

phplaravellaravel-5.2

提问by gsk

I have updated the composer.json file as instructed on the upgrade guide on Laravel 5.2 Documentation and run composer update.

我已经按照 Laravel 5.2 文档升级指南中的说明更新了 composer.json 文件并运行 composer update。

Everything was updated correctly, but composer dumped the error below while generating autoload files.

一切都正确更新,但作曲家在生成自动加载文件时转储​​了以下错误。

Class 'Illuminate\Routing\ControllerService Provider' not found in /home/vagrant/Code/homework/vendor/laravel/framework /src/Illuminate/Foundation/ProviderRepository.php on line 146

回答by tptcat

Make sure you remove Illuminate\Routing\ControllerServiceProviderfrom your /config/app.php.

确保您Illuminate\Routing\ControllerServiceProvider/config/app.php.

https://www.laravel.com/docs/5.2/upgrade(see the "Service Providers" section)

https://www.laravel.com/docs/5.2/upgrade(请参阅“服务提供商”部分)

回答by SwR

Problem is with your composer.json.It may got corrupted. Make sure

问题出在您的 composer.json 上。它可能已损坏。确保

"require": { "laravel/framework": "5.2.*" },

"require": { "laravel/framework": "5.2.*" },

exists.Then run composer update.

存在。然后运行作曲家更新。