1

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
    according to these answers http://stackoverflow.com/questions/28576088/why-am-i-getting-this-error-with-laravel-php-catchable-fatal-error it happens when you call `url()` or `asset()` methods inside config files – Ravisha Hesh Jun 23 '16 at 16:18

1 Answers1

0

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.