Dont try to use tiers package with L5 before it gets more stability. This is an example inline link.
@rapliandras, thanks. I will check it out.
@rapliandras is laravel 4.3 any stable version?.. what i think after laravel 4.2,upcoming version is laravel 5.0 only. there is nothing like laravel 4.3. correct me, if i am wrong?
@kushpal, Laravel 5 was formerly know as Laravel 4.3, but due to the numerous changes Taylor upgraded it to Laravel 5 :) So no there is no L4.3 :)
To skip this error, I downloaded a fresh copy of L5 and everything worked fine until 2 days ago (I ran "composer update" several times). Today, after running "composer update", I get the "ReflectionException... log... etc." error again. Can anybody please explain me what's wrong? Thanks.
@encodia, the sturcture of a default laravel app changed you need to reflect those changes. Checkout github for the changes.
Thank you @MThomas. I merged from laravel/laravel (develop) and now everything seems to work.
Anyway, I'm still confused about what I wrote in my last post. The fresh L5 copy I manually downloaded (without GIT) was already reflecting the news structure, and everything was ok (no "ReflectionException: Class log does not exist"). Run "composer update" a few time, and everything was still ok. But after the last "composer update" the error "Class log does not exist" occurred again.
I was having the same issue which I managed to trace down by outputting what get's resolved by Illuminate\Container\Container. Essentially in a fresh working repo, this is the list of concretes that are reflected:
[
'App\Http\Kernel',
'Illuminate\Foundation\Bootstrap\DetectEnvironment',
'Illuminate\Foundation\Bootstrap\LoadConfiguration',
'Illuminate\Foundation\Bootstrap\ConfigureLogging',
'Illuminate\Foundation\Bootstrap\HandleExceptions',
'Illuminate\Foundation\Bootstrap\RegisterFacades',
'Illuminate\Foundation\Bootstrap\RegisterProviders',
'Illuminate\Foundation\Bootstrap\BootProviders',
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode',
'Illuminate\Cookie\Middleware\EncryptCookies',
'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse',
'Illuminate\Session\Middleware\StartSession',
'Illuminate\View\Middleware\ShareErrorsFromSession',
'Illuminate\Foundation\Http\Middleware\VerifyCsrfToken',
'App\Http\Controllers\WelcomeController',
'App\Http\Middleware\RedirectIfAuthenticated',
]
Now in my repo where I had this issue, the stack looks differently:
'App\Http\Kernel',
'Illuminate\Foundation\Bootstrap\DetectEnvironment',
'App\Exceptions\Handler',
and it dies there. So to me it looks like that if an exception get's thrown during the environment detection, it will crash. Notice that in the broken example, laravel tries to throw an exception BEFORE the configuration/logging/exceptions/facades are even loaded, thus why it crashes. So yeah an issue with the stack in laravel. Anyway, try to delete your .env file and do a fresh copy from the example one, worked for me. Also note that if the permissions on your .env file are not open enough, you'll get the same error (go with chmod 644 .env).
@encodia, that will happen a lot, as you can see on github https://github.com/laravel/laravel/commits/develop and https://github.com/laravel/framework/commits/master several changes are pushed daily. And config settings or the app structure will change a lot. If you need to work on L5 keep track of the commits and the issues.
I thought all along it was something with my composer or vendor files but it was simply that I was trying to call a cartController class when the actual class name was CartController. Case matters... obviously. I'm guessing my local server didn't catch this error because the PHP version installed allowed for either case to be accepted.
I had the same issue. To anyone having this issue, it may be because in your .env file, you may have a space between words after the equal sign.
For me, I had a MAIL_FROM_NAME=my domain (notice the space between my and domain).
I just removed the space and it fixed it self.
@rishabswift you have just saved my day, you have just saved it!
Space in the .env file was what did it for me. Thank you so much @rishabswift
@rishabswift thank you so much. I've been struggling with a Laravel 5.2 upgrade for the past week and this solved my issue. I'm now wrapping my strings in quotes in my .env file.
Hi! I was using a docker container with PHP7, and had this same problem, solved installing mbstring PHP extension.
Go look in your .env file.... If you have any lines in there with spaces or special characters in them (like DB passwords and the like, put them between a pair of double quotation marks.
For example I have:
APP_VERSION=1.0&alpha build 345
Which I changed to:
APP_VERSION="1.0&alpha build 345"
Fixed the problem for me
Seems there are different reasons for this issue. I found a solution rather by being lucky.
Here is the error I got:
Fatal error: Uncaught ReflectionException: Class log does not exist in /home/vagrant/Code/L52/vendor/laravel/framework/src/Illuminate/Container/Container.php:738 Stack trace: #0 /home/vagrant/Code/L52/vendor/laravel/framework/src/Illuminate/Container/Container.php(738): ReflectionClass->__construct('log') #1 /home/vagrant/Code/L52/vendor/laravel/framework/src/Illuminate/Container/Container.php(633): Illuminate\Container\Container->build('log', Array) #2 /home/vagrant/Code/L52/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array) #3 /home/vagrant/Code/L52/vendor/laravel/framework/src/Illuminate/Container/Container.php(853): Illuminate\Foundation\Application->make('log') #4 /home/vagrant/Code/L52/vendor/laravel/framework/src/Illuminate/Container/Container.php(808): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter)) #5 /home/vagrant/Code/L52/vendor/laravel/framework/src/Illuminate/Container/Container.php(777): Illuminate\Container\Co in /home/vagrant/Code/L52/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 738
It looked very scary but in the end only a comma (,) was missing (not really what I expected by looking at the error message). I did put some global values into a globals.php within the config folder
<?php
return array(
'credit_types' => [
'Subscription' => '1 month',
'Credit Package' => '12 month',
'Service Team' => '2 month',
'Other' => '1 week'
], // <-- this comma was missing producting the error above
'supportedcalendars' => [
'outlook',
'google',
'yahoo',
'ical',
'iphone',
],
);
Hope it helps someone.
This is because you have "spaces" into the string assigned to your .env vars. For example, APP_NAME = this is the name
In this case you should use something like APP_NAME = "this is the name"
I just had this exact problem but my solution was different to all of these suggestions.
I was trying to use the helper "url()" in one of my configs and I think I was trying to do it before laravel could load the logger service so it was freaking out.
I am getting this error how to fixed it?
[RuntimeException]
Error Output: PHP Fatal error: Uncaught exception 'ReflectionException' wi
th message 'Class App\Console\Kernel does not exist' in /var/www/html/larav
el/vendor/laravel/framework/src/Illuminate/Container/Container.php:738
Stack trace:
#0 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Container/
Container.php(738): ReflectionClass->__construct('App\Console\Ker...')
#1 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Container/
Container.php(633): Illuminate\Container\Container->build('App\Console\Ker.
..', Array)
#2 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Foundation
/Application.php(674): Illuminate\Container\Container->make('App\Console\Ke
r...', Array)
#3 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Container/
Container.php(230): Illuminate\Foundation\Application->make('App\Console\Ke
r...', Array)
#4 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Container/
Container.php(735): Illuminate\Container\Container->Illuminate\Container{c
losure}(Object(Illuminate\Foundation in /var/www/html/laravel/vendor/larave
l/framework/src/Illuminate/Container/Container.php on line 738
Had same problem, for me it was probably the '@' symbol in the address value of the Global 'from' address. Double quotes fixed around these values and the single 'name' field value solved the issue.
Can't believe I did it! I got this same error just because I used url() function in config/services.php file.
Just in case that could help someone.
Today I started seeing this error as well but on a NEW CENTOS 7 container with a fresh everything. I suspect the issue is PHP 7 as the Laravel code is an rsync copy of a working site.
composer update
php artisan clear-compiled PHP Fatal error: Uncaught ReflectionException: Class log does not exist in /var/www/vhosts/XXXXXXXXXcom.au/vendor/laravel/framework/src/Illuminate/Container/Container.php:741 Stack trace: #0 /var/www/vhosts/domain-renewals.conetix.com.au/vendor/laravel/framework/src/Illuminate/Container/Container.php(741): ReflectionClass->__construct('log') .... .... ....
I ran:
composer update --no-scripts
Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.
Problem 1 - videlalvaro/php-amqplib v2.2.6 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system. - videlalvaro/php-amqplib v2.2.5 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system. - videlalvaro/php-amqplib v2.2.4 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system. - videlalvaro/php-amqplib v2.2.3 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system. - videlalvaro/php-amqplib v2.2.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system. - videlalvaro/php-amqplib v2.2.1 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system. - videlalvaro/php-amqplib v2.2.0 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system. - videlalvaro/php-amqplib v2.2.6 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system. - Installation request for videlalvaro/php-amqplib 2.2.* -> satisfiable by videlalvaro/php-amqplib[v2.2.0, v2.2.1, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php.ini
- /etc/php.d/20-bz2.ini
- /etc/php.d/20-calendar.ini
- /etc/php.d/20-ctype.ini
- /etc/php.d/20-curl.ini
- /etc/php.d/20-exif.ini
- /etc/php.d/20-fileinfo.ini
- /etc/php.d/20-ftp.ini
- /etc/php.d/20-gettext.ini
- /etc/php.d/20-iconv.ini
- /etc/php.d/20-json.ini
- /etc/php.d/20-mysqlnd.ini
- /etc/php.d/20-pdo.ini
- /etc/php.d/20-phar.ini
- /etc/php.d/20-sockets.ini
- /etc/php.d/20-sqlite3.ini
- /etc/php.d/20-tokenizer.ini
- /etc/php.d/30-mysqli.ini
- /etc/php.d/30-pdo_mysql.ini
- /etc/php.d/30-pdo_sqlite.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
After I ran a yum install php-bcmath I ran composer again and it reported mbstring, ive repeated this till all the extensions are satisfied.
After that composer update worked with no issues... suggestion.... check your PHP packages and run a yum update or apt-get or whatever you use to make sure you are up to date.
I have a project got from my client, built in Laravel 4, getting this : ReflectionException
Class Lib\Produtos\ProdutoRepository does not exist
but the class is still present in this namespace; no solution is working :(
I had a missing ending parenthesis after editing my database.php which triggered this error. After fixing the typo all was good!
Damn, thanks @gocanto! It was exactly that.
@giovannipds np!
I was missing php70-pdo
Got this during upgrade from 5.0 to 5.2 and finally found a suggestion from someone regarding rebuilding vendor. That worked for me!
Try to restart your Webserver or check your redis cache.
Please or to participate in this conversation.