-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Rendering Forms without Translators and Validators #31968
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
Comments
I'm not sure to have fully understood the Beside that I think that setting the Any thoughts? @javiereguiluz |
The Form component doesn't require Translation at the moment (https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Form/composer.json) and recently we also decoupled the Validator component from Translation (#28210). |
but the Twig form theme needs at least the translation contracts to be installed. |
I missed that. Then we should add translation-contracts to require, right? |
@dFayet It is absolutely fine to require Having In the end, because of this default setting @nicolas-grekas IMHO, it would be better to fix default setting for |
@PF4Public Can you confirm that #31988 fixes this? |
…ut translations (xabbuh) This PR was merged into the 4.3 branch. Discussion ---------- [TwigBridge] add back possibility to use form themes without translations | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #31968 | License | MIT | Doc PR | Commits ------- 87c1d19 add back possibility to use form themes without translations
Adding Could anyone, please, explain what are the |
Symfony version(s) affected: 4.3.1
Description
When a form is to be rendered, the following code in Twig runs:
By default
translation_domain
fromvalidation
"is not same as(false) ", which results in callingtrans
. Which in turn gives an exceptionTrying to override
translation_domain
fromvalidation
implicitly enablesvalidation
and gives another error:How to reproduce
Try to render a Form without Translators and Validators
Possible Solution
translation_domain
should befalse
ifvalidation
is disabledThe text was updated successfully, but these errors were encountered: