作曲家更新后,Laravel 5.1 Php artisan命令不起作用 [英] Laravel 5.1 Php artisan commands not working after composer update
问题描述
这是我的composer.json要求代码段.
here is my composer.json require snippet.
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.35",
"aws/aws-sdk-php-laravel": "~3.0",
"lucadegasperi/oauth2-server-laravel": "5.1.*",
"bosnadev/repositories": " 0.*",
"laravelcollective/html": "5.1.*",
"cartalyst/stripe-laravel": "3.0.*"
},
我运行了作曲家更新,以添加新的AWS服务.但是后来我注意到,由于composer update命令,所有供应商文件都已更新.现在,当我运行php artisan命令时遇到错误.
I ran composer update in order to add new AWS services. but then I noted that all the vendor files are updated because of composer update command. now I'm getting error when I ran php artisan commands.
这是错误消息:-
PHP Catchable fatal error: Argument 2 passed to Illuminate\Routing\UrlGenerator
::__construct() must be an instance of Illuminate\Http\Request, null given, call
ed in C:\Users\User\projects\projectxyz\projectxyzweb\vendor\laravel\framework\
src\Illuminate\Routing\RoutingServiceProvider.php on line 62 and defined in C:\U
sers\User\projects\projectxyz\projectxyzweb\vendor\laravel\framework\src\Illumi
nate\Routing\UrlGenerator.php on line 102
如何解决此问题?有什么方法可以在不丢失我的代码的情况下还原作曲家的更新?
How can I resolve this issue? is there any wayto revert composer update without loosing my code?
推荐答案
我终于设法摆脱了这个错误.我不是作曲家的更新.我已经在配置文件中添加了url()来设置基本URL.删除后,php artisan起作用了.
I finally manage to get rid of this error. I was not my composer update. I have added url() to set base url in my config files. After removing it php artisan worked.
这篇关于作曲家更新后,Laravel 5.1 Php artisan命令不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!