问题
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