1
votes

I had to clear config and cache, I ran into the following exception :

PHP Fatal error: Uncaught ReflectionException: Class log does not exist in /html/project/bootstrap/cache/compiled.php:1355

I removed bootstrap/compiled.php and ran php artisan clear-compiled, Then the exception got changed a little bit.

Class log does not exist in /html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php:734

Steps i took to solve it :

  • Checked env for spaces and syntax errors, Which had a blank space and i removed it, but still my php artisan commands are not working.
  • Ran composer update | Still not working
  • Some people associate the error with mbstring and php-mysql extensions which i both have.
  • Tried composer dumpautoload

What am i missing, How should be done ?

1
Try running composer dumpautoloadaynber
@aynber have tried that also, Still not workingGammer
Apparently the error message here doesn't really help explain what's going on. You can try find . -iname '*.php' -exec php -l '{}' \; | grep -v '^No syntax errors' on the command line to see if it finds any overt errors.aynber

1 Answers

0
votes

I think somewhere in your code there is a typo like this (note lowercase 'l'):

\log::info('test');

And that code is executed when artisan is executed, so, probably this is somewhere in your console commands, or maybe in some services used by console commands, or maybe some global configuration.

Anyhow, search for '\log::' or 'log::' (in top-level file without namespaces this would result in same error message), and you'll find it.