DatetimepickerBundle icon indicating copy to clipboard operation
DatetimepickerBundle copied to clipboard

Do not use deprecated TwigRendererInterface

Open c960657 opened this issue 7 years ago • 0 comments

DatetimepickerBundle is incompatible with Symfony 3.4 and throws this error:

Type error: Argument 1 passed to SC\DatetimepickerBundle\Twig\Extension\FormExtension::__construct() must be an instance of Symfony\Bridge\Twig\Form\TwigRendererInterface, instance of Symfony\Component\Form\FormRenderer given, called in appDevDebugProjectContainer.php on line 2005

Symfony\Bridge\Twig\Form\TwigRendererInterface was deprecated in Symfony 3.2, and as of Symfony 3.4, twig.form.renderer is now an instance of Symfony\Component\Form\FormRenderer that does not implement TwigRendererInterface.

Simply adjusting the type hint fixes this issue. TwigRendererInterface inherits from FormRenderer, so this PR will work with both 3.4 and older versions.

c960657 avatar Apr 07 '18 18:04 c960657