Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Autowiring] Controller/Actions are not autowired if called through twig render*(  #35909

Closed
@Plopix

Description

@Plopix

Symfony version(s) affected: 5.0
(it works on 4.4)

Description
Autowiring is correctly set up and it is working as expected but not when using render functions.
https://github.com/Plopix/symfony-autowiring-render-twig-bug/blob/master/sf5/src/Controller/DefaultController.php

OK in SF 4.4, not on SF 5.0

How to reproduce
Here is a reproducer.
https://github.com/Plopix/symfony-autowiring-render-twig-bug

just checkout

cd sf4
composer install
symfony server:start
cd sf5
composer install
symfony server:start

but you'd know that ;)

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