Skip to content

Commit

Permalink
bug #32116 [FrameworkBundle] tag the FileType service as a form type …
Browse files Browse the repository at this point in the history
…(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
  • Loading branch information
fabpot committed Jun 20, 2019
2 parents 6fcd319 + ea5b1f4 commit 370682c
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -93,6 +93,7 @@
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
</service>
<service id="form.type.file" class="Symfony\Component\Form\Extension\Core\Type\FileType" public="true">
<tag name="form.type" />
<argument type="service" id="translator" on-invalid="ignore" />
</service>
<service id="form.type.hidden" class="Symfony\Component\Form\Extension\Core\Type\HiddenType" public="true">
Expand Down

0 comments on commit 370682c

Please sign in to comment.