[英]Laravel php artisan config:cache throws Uncaught RuntimeException: A facade root has not been set. After installing new composer package
My laravel project was working all fine in its development environment after including a php dependency Shopify/shopify-php: ^0.11.0
and doing a php artisan config cache. 我的laravel项目在包含php依赖Shopify/shopify-php: ^0.11.0
并进行了php artisan config cache之后,在其开发环境中一切正常。 Everything went fine until i pulled the same branch into a different directory and did a composer install for new dependency to reflect. 一切正常,直到我将同一分支拉到另一个目录中,并进行了作曲家安装以反映新的依赖性。 Where following error came up on doing php artisan config:cache post install. 在执行php artisan config:cache post install之后出现以下错误。 And I have no clue where to start debugging it. 而且我不知道从哪里开始调试它。
PHP Fatal error: Uncaught RuntimeException: A facade root has not been set.
in /home/apps/panel/v4.0.6/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:234
Stack trace:
#0 /home/apps/panel/v4.0.6/app/Exceptions/Handler.php(40): Illuminate\Support\Facades\Facade::__callStatic('has', Array)
#1 /home/apps/panel/v4.0.6/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(320): App\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#2 /home/apps/panel/v4.0.6/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Foundation\Console\Kernel->reportException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#3 /home/apps/panel/v4.0.6/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Here's my gitignore if that helps 这是我的gitignore,如果有帮助
/node_modules
/public/storage
/vendor
/.idea
Homestead.json
Homestead.yaml
.env
public/.htaccess
Also checking out to a branch with the older dependencies, doing php artisan config:cache and returning to new branch and doing php artisan config:cache works fine. 还签出到具有较早依赖性的分支,执行php artisan config:cache并返回到新分支并执行php artisan config:cache可以正常工作。
在php artisan config:cache
之后尝试composer dump-autoload
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.