-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected: 4.1 and prior (since 6 years i think)
Description
When the translation is disabled (and the translator component not even install) and use a ChoiceType input in your form, we get the following exception :
Uncaught PHP Exception InvalidArgumentException: "The helper "translator" is not defined."
How to reproduce
- Unistall translator component
- Disable translation in the framework.yaml
- Create a form with ChoiceType input
- Set the choice_translation_domain to false
Possible Solution
In the file choice_widget_options.html.php on line 3, it would be nice to add a test on the existence of the translator component. Or check if the enable translator option in conf is set to false.
PabloKowalczyk, QuentinCurtet and diegobanos