Skip to content

Commit 370682c

Browse files
committed
bug #32116 [FrameworkBundle] tag the FileType service as a form type (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- [FrameworkBundle] tag the FileType service as a form type | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | part of #32045 | License | MIT | Doc PR | In #30961 we undeprecated the `form.type.file` service as we need to pass the translator to the form type. But we forgot to add back the `form.type` tag which means that the form registry actually never used our service but instantiated the `FileType` itself and thus the type was never able to use a translator. Commits ------- ea5b1f4 tag the FileType service as a form type
2 parents 6fcd319 + ea5b1f4 commit 370682c

File tree

1 file changed

+1
-0
lines changed
  • src/Symfony/Bundle/FrameworkBundle/Resources/config

1 file changed

+1
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
9494
</service>
9595
<service id="form.type.file" class="Symfony\Component\Form\Extension\Core\Type\FileType" public="true">
96+
<tag name="form.type" />
9697
<argument type="service" id="translator" on-invalid="ignore" />
9798
</service>
9899
<service id="form.type.hidden" class="Symfony\Component\Form\Extension\Core\Type\HiddenType" public="true">

0 commit comments

Comments
 (0)