問(wèn)題描述
我正在遵循 5.1 的官方升級(jí)指南到 5.2.第一個(gè)小節(jié)說(shuō):
I'm following the official upgrade guide from 5.1 to 5.2. First sub-section says:
如果您要安裝 Laravel 5.2 的測(cè)試版,請(qǐng)?zhí)砑?code>"minimum-stability": "beta" 到您的 composer.json 文件.
If you are installing a beta release of Laravel 5.2, add
"minimum-stability": "beta"
to your composer.json file.
更新您的 composer.json 文件以指向 laravel/framework 5.2.*
.
Update your composer.json file to point to laravel/framework 5.2.*
.
將 symfony/dom-crawler ~3.0
和 symfony/css-selector ~3.0
添加到composer.json 文件的 require-dev 部分.
Add symfony/dom-crawler ~3.0
and symfony/css-selector ~3.0
to the
require-dev section of your composer.json file.
現(xiàn)在,在我引入上述更改并運(yùn)行 composer update
后,出現(xiàn)以下錯(cuò)誤:
Now, after I introduce the above changes and run composer update
, I get the following error(s):
PHP Fatal error: Class 'IlluminateRoutingControllerServiceProvider' not found
in /home/vagrant/Code/myproject/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
和
[SymfonyComponentDebugExceptionFatalErrorException]
Class 'IlluminateRoutingControllerServiceProvider' not found
和
[RuntimeException]
Error Output: PHP Fatal error: Class 'IlluminateRoutingControllerServiceProvider' not found in /home/vagrant/Code/myproject/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
在更新完成后拋出錯(cuò)誤,并發(fā)生生成自動(dòng)加載文件".
The errors are thrown after the update is done, and "Generating autoload files" takes place.
可能有什么問(wèn)題?
這看起來(lái)不像是自定義包問(wèn)題,而是核心問(wèn)題.我是否應(yīng)該繼續(xù)升級(jí)指南并在所有內(nèi)容都已調(diào)整以適應(yīng)新框架版本后運(yùn)行 composer update
?
It does not look like a custom package issue, but a core one. Should I continue with the upgrade guide and run composer update
AFTER all has been adjusted to suit the new framework version?
更新
之后運(yùn)行 composer dump-autoload
不會(huì)拋出上述錯(cuò)誤.不過(guò)還是很困惑.
Running composer dump-autoload
afterwards doesn't throw the errors described above. Still confusing, though.
推薦答案
不再有IlluminateRoutingControllerServiceProvider
.
如果我是你,我會(huì)將我的應(yīng)用項(xiàng)目與 https://github.com/laravel/laravel/commits/develop
進(jìn)行比較,例如,如果您查看 https://github.com/laravel/laravel/blob/develop/config/app.php
你會(huì)看到 Laravel 5.2 的默認(rèn)提供者:
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:
IlluminateAuthAuthServiceProvider::class,
IlluminateBroadcastingBroadcastServiceProvider::class,
IlluminateBusBusServiceProvider::class,
IlluminateCacheCacheServiceProvider::class,
IlluminateFoundationProvidersConsoleSupportServiceProvider::class,
IlluminateCookieCookieServiceProvider::class,
IlluminateDatabaseDatabaseServiceProvider::class,
IlluminateEncryptionEncryptionServiceProvider::class,
IlluminateFilesystemFilesystemServiceProvider::class,
IlluminateFoundationProvidersFoundationServiceProvider::class,
IlluminateHashingHashServiceProvider::class,
IlluminateMailMailServiceProvider::class,
IlluminatePaginationPaginationServiceProvider::class,
IlluminatePipelinePipelineServiceProvider::class,
IlluminateQueueQueueServiceProvider::class,
IlluminateRedisRedisServiceProvider::class,
IlluminateAuthPasswordsPasswordResetServiceProvider::class,
IlluminateSessionSessionServiceProvider::class,
IlluminateTranslationTranslationServiceProvider::class,
IlluminateValidationValidationServiceProvider::class,
IlluminateViewViewServiceProvider::class,
/*
* Application Service Providers...
*/
AppProvidersAppServiceProvider::class,
AppProvidersAuthServiceProvider::class,
AppProvidersEventServiceProvider::class,
AppProvidersRouteServiceProvider::class,
這篇關(guān)于將 Laravel 5.1 升級(jí)到 5.2 時(shí)出現(xiàn)致命錯(cuò)誤的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!