From 47a3d7a08454200acc5a9c37fdd0478bb653c6da Mon Sep 17 00:00:00 2001 From: David Maicher Date: Fri, 16 Mar 2018 19:07:30 +0100 Subject: [PATCH] [TwigBundle] document TwigRenderer BC break in UPGRADE-3.4 --- UPGRADE-3.4.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/UPGRADE-3.4.md b/UPGRADE-3.4.md index 2638d84c80..38891caf76 100644 --- a/UPGRADE-3.4.md +++ b/UPGRADE-3.4.md @@ -410,6 +410,14 @@ TwigBridge * deprecated the `Symfony\Bridge\Twig\Form\TwigRenderer` class, use the `FormRenderer` class from the Form component instead + + * the service `twig.form.renderer` is now an instance of `FormRenderer`. + So you might have to adjust your type-hints to `FormRendererInterface` if you are still relying on + the `TwigRendererInterface` which was deprecated in Symfony 3.2 + + * retrieving the Renderer runtime from the twig environment via + `$twig->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')` is not working anymore + and should be replaced with `$twig->getRuntime('Symfony\Component\Form\FormRenderer')` instead * deprecated `Symfony\Bridge\Twig\Command\DebugCommand::set/getTwigEnvironment` and the ability to pass a command name as first argument