Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

NoNameProvided's avatar

php artisan not work after installing another laravel app as a dependency

The scenario: We have a laravel project which holds our database migrations. We want to keep it as a separate project so we can run it separately when we need to.

But we want to use it in our other projects too, in a Laravel project we can use it by requiring it in the composer.json then run the php artisan vendor:publish command in the post-install-cmd section.

But in lumen this command is not available in artisan so I we tried to use the --path switch on the migrate command like below:

php artisan migrate --path=vendor/mycompany/migrations/database/migrations

The composer install run successfully but then the install fail and the artisan doesn't work anymore. When I type php artisan then I get the following error:

http://pastebin.com/ZEmKmvqp

$ php artisan
PHP Fatal error:  Uncaught exception 'ReflectionException' with message 'Class path.storage does not exist' in F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Container\Container.php:736
Stack trace:
#0 F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Container\Container.php(736): ReflectionClass->__construct('path.storage')
#1 F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Container\Container.php(626): Illuminate\Container\Container->build('path.storage', Array)
#2 F:\Repos\mock-opta\vendor\laravel\lumen-framework\src\Application.php(413): Illuminate\Container\Container->make('path.storage', Array)
#3 F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php(53): Laravel\Lumen\Application->make('path.storage', Array)
#4 F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php(528): app('path.storage')
#5 F:\Repos\mock-opta\vendor\laravel\lumen-framework\src\Application.php(624): storage_path('logs/lumen.log')
#6 F:\Repos\mock-opta\vendor\laravel in F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 736
PHP Fatal error:  Uncaught exception 'ReflectionException' with message 'Class path.storage does not exist' in  F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Container\Container.php:736
Stack trace:
#0 F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Container\Container.php(736): ReflectionClass->__construct('path.storage')
#1 F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Container\Container.php(626): Illuminate\Container\Container->build('path.storage', Array)
#2 F:\Repos\mock-opta\vendor\laravel\lumen-framework\src\Application.php(413): Illuminate\Container\Container->make('path.storage', Array)
#3 F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php(53): Laravel\Lumen\Application->make('path.storage', Array)
#4 F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php(528): app('path.storage')
#5 F:\Repos\mock-opta\vendor\laravel\lumen-framework\src\Application.php(624): storage_path('logs/lumen.log')
#6 F:\Repos\mock-opta\vendor\laravel in F:\Repos\mock-opta\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 736
0 likes
0 replies

Please or to participate in this conversation.