laravel / lumen-framework

The Laravel Lumen Framework.
https://lumen.laravel.com
MIT License
1.48k stars 419 forks source link

5.5 setRouteResolver no support in Illuminate\Http\Request #650

Closed Except10n closed 6 years ago

Except10n commented 7 years ago

Description:

$request['xxxxxx'] throw an exception,

Call to a member function parameter() on array

Lumen set the resolver will return one array

$this->currentRoute = $routeInfo;

$this['request']->setRouteResolver(function () {
    return $this->currentRoute;
});

Illuminate\Http\Request > __get() > route() call parameter on array

$route = call_user_func($this->getRouteResolver());

        if (is_null($route) || is_null($param)) {
            return $route;
        }

        return $route->parameter($param);

Steps To Reproduce:

driesvints commented 6 years ago

Closing this issue because it's already solved, old or not relevant anymore. Feel free to reply if you're still experiencing this issue.