Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use deprecated TwigRendererInterface #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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