Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes |
RFC? | no |
Symfony version | 3.4.x-dev 0f5e38c |
I just tried upgrading one of my apps from 3.3.10 to symfony 3.4.x-dev and stumbled across this issue in combination with Sonata admin: sonata-project/SonataAdminBundle#4652
As far as I understand the TwigRenderer was deprecated and is now actually an instance of FormRenderer?
Which breaks code like this (which is done in a similar way on Sonata admin):
$twig = $this->get('twig');
$twig
->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')
->initRuntime($twig);
$twig
->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')
->renderer;
Or this:
$twig = $this->get('twig');
$twig
->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')
->renderer;
$twig
->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')
->initRuntime($twig);
As this check is not true anymore https://github.com/symfony/symfony/blob/3.4/src/Symfony/Bridge/Twig/Extension/FormExtension.php#L55
And this method setEnvironment
does not exist on FormRenderer
: https://github.com/symfony/symfony/blob/3.4/src/Symfony/Bridge/Twig/Extension/FormExtension.php#L122