1

After doing composer update my project starts to show this error in everywhere in my production environment. 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. I made composer update again but don't fix the error.

My composer.json is look like this:

...
"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"
}, 
...
leoalmar
  • 226
  • 5
  • 14

2 Answers2

2

Thanks guys!

I found the problem.

I removed the packages of my composer.json and works.

"php-console/php-console": "~3.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.

Community
  • 1
  • 1
leoalmar
  • 226
  • 5
  • 14
-1

Most of the times, this error fixing is very simple. Just run

composer dump-autoload

and without any doubt, your error will be fixed.

Aditya Giri
  • 1,786
  • 18
  • 33