Framework: [5.4] Fail after composer update

Created on 24 Apr 2017  路  3Comments  路  Source: laravel/framework

  • Laravel Version: 5.4. (latest)
  • PHP Version: 7.1
  • Database Driver & Version:

Description:

I run composer update just now and

Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize

[Symfony\Component\Debug\Exception\FatalThrowableError]
  Type error: Argument 2 passed to Illuminate\Routing\UrlGenerator::__constru
  ct() must be an instance of Illuminate\Http\Request, null given, called in
  [...]/vendor/laravel/framework/src/Illuminate/R
  outing/RoutingServiceProvider.php on line 64

Any idea?

Most helpful comment

@brunogaspar yes, url() in config. Thank you.

All 3 comments

I just updated and everything is working as expected, so it seems to be on your application.

Not sure if it's the issue, but i recall people having the same issue when using functions like url(), asset(), etc.. in config files, check if you have any of those.

@brunogaspar yes, url() in config. Thank you.

I had the same issue with Laravel 5.6 and it was because I was using url( ) in the config.php.

I switched to using env('APP_URL').... and that fixed the issue for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PhiloNL picture PhiloNL  路  3Comments

digirew picture digirew  路  3Comments

kerbylav picture kerbylav  路  3Comments

shopblocks picture shopblocks  路  3Comments

lzp819739483 picture lzp819739483  路  3Comments