-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'ReflectionException' with message 'Class path.storage does not exist' #504
Comments
Looks like a bug in a package you're using perhapse? |
No I do not think depend on some package, because it stopped working suddenly this is composer.json { |
What is the exact version of Lumen that you use? |
5.3.1 updated today, but already with 5.3 had problems with php artisan |
Looks like it's due to asamaru7/eloquent-model-generator-for-lumen. |
No I do not think so. |
I'm running into similar weird problems
I think its related 2016-11-11 08:34:12] lumen.ERROR: exception 'ReflectionException' with message 'Class App\Http\Controllers\Request does not exist' in /var/www/html/dbapi/api/vendor/illuminate/container/Container.php:573 |
In my case (lumen 5.3.3) got fixed by adding following lines right after $app definition in $app = new Laravel\Lumen\Application(
realpath(__DIR__ . '/../')
);
$app->instance('path.config', app()->basePath() . DIRECTORY_SEPARATOR . 'config');
$app->instance('path.storage', app()->basePath() . DIRECTORY_SEPARATOR . 'storage');
//$app->withFacades();
$app->withEloquent(); |
This is happening because Illuminate's helpers are being loaded before Lumen's. My autoload_files.php:
This seems to happen when laravel/framework gets required by something, composer wipes out lumens vendor/illuminate files with vendor/laravel/framework (laravel/framework composer.json says replace illuminate.) - this in turn includes illuminate/Foundation/helpers.php What's weirder is it seems like we're beholden to composer and how it scores/sorts autoload_files.php. I managed to get this to load in different (working) orders but I'm not 100% sure how - and frankly don't have time for this. But that does confirm @bthibault's issue. This issue also persists after removing offending packages from composer.json and running composer update. I suspect this is a caching problem with the laravel replace and composer. These steps seem to fix the issue, at least intermittently: (and may help reproducing the issue!)
|
In my case I was running This only seems to have emerged after I recently added config/filesystems.php. The solution was to run tests with
|
Consider where |
Same issue reported in laravel 5.4 |
Please check #798 and see if the problem still exists in 5.7. Otherwise feel free to ping me to reopen :) |
This issue still exists in 5.7 If you are running lumen and if any required package uses as a dependency |
Make sure the call to
|
Lumen 5.8 also - I just hit this problem. I had Adding the two lines @hpaknia suggests here has solved it for me, though that feels like a hack. |
After It appears it causes If you don't particularly need Larastan, you can recover from this with removing |
Clearing composer cache and install vendor packages fixed in my case.
|
Try this: $app->instance('path.config', app()->getConfigurationPath()); |
Hi, I encountered the same problem yesterday. I did some research and end up here. Although this issue didn't help me, I was able to figure out that it was one of the packages which were incompatible with my Lumen app. Later, I figured out that it happened because of the latest version (8.x) of To solve the problem I just removed the latest version of SwaggerLume and installed 7.x as specified in the documentation. Hope this will help people with similar error. Thanks. :) |
Yeah, I also encountered the same problem now. Lumen 8.x ,there are two I used |
Same issue in lumen 8.x after doing php artisan vapor-ui:install |
I think for config_path, you should use |
I think you found the bug, the definition of storage_path() is wrong in laravel8 helpers.php looking at config_path(), you can see it is exactly the same definition in lumen and laravel, so no conflict |
Same issue with Lumen 8^ version I installed "darkaonline/l5-swagger": "^8.0" and after run command
Running
didnt help |
Swagger laravel has separate version for lumen So I downloaded this version and all fine now |
This helped me |
after run:
php artisan
get this errors:
PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class path.storage does not exist' in /Applications/MAMP/htdocs/folder-project/vendor/laravel/framework/src/Illuminate/Container/Container.php:748 Stack trace:
PHP Fatal error: Uncaught exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Uncaught exception 'ReflectionException' with message 'Class path.storage does not exist' in /Applications/MAMP/htdocs/folder-project/vendor/laravel/framework/src/Illuminate/Container/Container.php:748 Stack trace:
The text was updated successfully, but these errors were encountered: