[英]Laravel 5.1.11 Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist'
After doing composer update
my project starts to show this error in everywhere in my production environment. 完成composer update
我的项目开始在生产环境中的任何地方显示此错误。 But in local is working perfectly. 但在本地运行良好。
Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' in
.../src/Illuminate/Container/Container.php:736 Stack trace: #0
.../src/Illuminate/Container/Container.php(736): ReflectionClass->__construct('log') #1
.../src/Illuminate/Container/Container.php(626): Illuminate\Container\Container->build('log', Array) #2
.../src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array) #3
.../src/Illuminate/Container/Container.php(837): Illuminate\Foundation\Application->make('Psr\\Log\\LoggerI...') #4
.../src/Illuminate/Container/Container.php(800): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter)) #5
.../src/Illuminate/Container/Container.php(771): Illuminate\Cont in
.../src/Illuminate/Container/Container.php on line 736
My local environment is OSX 10.10.5 and my production environment is Linux. 我的本地环境是OSX 10.10.5,生产环境是Linux。 I made composer update
again but don't fix the error. 我再次进行了composer update
,但没有解决错误。
My composer.json is look like this: 我的composer.json看起来像这样:
...
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"folklore/image": "0.2.*",
"illuminate/html": "5.*",
"cartalyst/sentry": "dev-feature/laravel-5"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"laracasts/generators": "~1.1",
"php-console/php-console": "~3.0",
"php-console/laravel-service-provider": "~5.0"
},
...
Thanks guys! 多谢你们!
I found the problem. 我发现了问题。
I removed the packages of my composer.json and works. 我删除了composer.json的程序包并开始工作。
"php-console/php-console": "~3.0", “ php-console / php-console”:“〜3.0”,
"php-console/laravel-service-provider": "~5.0" “ php-console / laravel-service-provider”:“〜5.0”
I think that the server does not support the packages because is necessary a .bat
file for the packages work. 我认为服务器不支持这些软件包,因为软件包需要一个.bat
文件才能正常工作。
Most of the times, this error fixing is very simple. 在大多数情况下,此错误修复非常简单。 Just run 赶紧跑
composer dump-autoload
and without any doubt, your error will be fixed. 毫无疑问,您的错误将得到解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.