Laravel 5.1 Php artisan commands not working after composer update

白昼怎懂夜的黑 提交于 2020-12-13 18:44:11

问题


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.*"
},

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.

This is the error message:-

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?


回答1:


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.



来源:https://stackoverflow.com/questions/37974116/laravel-5-1-php-artisan-commands-not-working-after-composer-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!