Skip to content

InlineFragmentRenderer should create subrequest based on input request #17123

@ruudk

Description

@ruudk

In our project we have created our own Request object. This works great except when we are doing fragment renders in twig:

{{ render(controller("AppBundle:Homepage:events")) }}

But now

public function eventsAction(My\Custom\Request $request)

fails because it is given a Symfony\Component\HttpFoundation\Request.

I found out that the problem is in

$subRequest = Request::create($uri, 'get', array(), $cookies, array(), $server);

If I change

$subRequest = Request::create($uri, 'get', array(), $cookies, array(), $server);

to

$subRequest = $request::create($uri, 'get', array(), $cookies, array(), $server);

It works :)

Is this by design or can I submit a PR to fix this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions