Skip to content

Conversation

@c960657
Copy link

@c960657 c960657 commented Apr 7, 2018

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 c960657 mentioned this pull request May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant