Skip to content

Commit 110d56f

Browse files
committed
feature #18356 [FrameworkBundle] Deprecated form types as services (HeahDude)
This PR was merged into the 3.1-dev branch. Discussion ---------- [FrameworkBundle] Deprecated form types as services | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ These services are needless in regard of #15079. If they have no dependencies, whatever are the registered extensions, `FormTypeInterface` instances will be autoloaded by their FQCN. Commits ------- dfe4f53 [FrameworkBundle] Deprecated form types as services
2 parents 6ed73d5 + dfe4f53 commit 110d56f

File tree

4 files changed

+97
-29
lines changed

4 files changed

+97
-29
lines changed

UPGRADE-3.1.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,39 @@ FrameworkBundle
2525
* As it was never an officially supported feature, the support for absolute
2626
template paths has been deprecated and will be removed in Symfony 4.0.
2727

28+
* The following form types registered as services are deprecated since 3.1
29+
and will be removed in 4.0; use their fully-qualified class name instead:
30+
31+
- `"form.type.birthday"`
32+
- `"form.type.checkbox"`
33+
- `"form.type.collection"`
34+
- `"form.type.country"`
35+
- `"form.type.currency"`
36+
- `"form.type.date"`
37+
- `"form.type.datetime"`
38+
- `"form.type.email"`
39+
- `"form.type.file"`
40+
- `"form.type.hidden"`
41+
- `"form.type.integer"`
42+
- `"form.type.language"`
43+
- `"form.type.locale"`
44+
- `"form.type.money"`
45+
- `"form.type.number"`
46+
- `"form.type.password"`
47+
- `"form.type.percent"`
48+
- `"form.type.radio"`
49+
- `"form.type.range"`
50+
- `"form.type.repeated"`
51+
- `"form.type.search"`
52+
- `"form.type.textarea"`
53+
- `"form.type.text"`
54+
- `"form.type.time"`
55+
- `"form.type.timezone"`
56+
- `"form.type.url"`
57+
- `"form.type.button"`
58+
- `"form.type.submit"`
59+
- `"form.type.reset"`
60+
2861
HttpKernel
2962
----------
3063

UPGRADE-4.0.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,43 @@ Form
1313
----
1414

1515
* The `choices_as_values` option of the `ChoiceType` has been removed.
16+
1617
* Support for data objects that implements both `Traversable` and
1718
`ArrayAccess` in `ResizeFormListener::preSubmit` method has been removed
1819

20+
* The following form types registered as services has been removed; use
21+
their fully-qualified class name instead:
22+
23+
- `"form.type.birthday"`
24+
- `"form.type.checkbox"`
25+
- `"form.type.collection"`
26+
- `"form.type.country"`
27+
- `"form.type.currency"`
28+
- `"form.type.date"`
29+
- `"form.type.datetime"`
30+
- `"form.type.email"`
31+
- `"form.type.file"`
32+
- `"form.type.hidden"`
33+
- `"form.type.integer"`
34+
- `"form.type.language"`
35+
- `"form.type.locale"`
36+
- `"form.type.money"`
37+
- `"form.type.number"`
38+
- `"form.type.password"`
39+
- `"form.type.percent"`
40+
- `"form.type.radio"`
41+
- `"form.type.range"`
42+
- `"form.type.repeated"`
43+
- `"form.type.search"`
44+
- `"form.type.textarea"`
45+
- `"form.type.text"`
46+
- `"form.type.time"`
47+
- `"form.type.timezone"`
48+
- `"form.type.url"`
49+
- `"form.type.button"`
50+
- `"form.type.submit"`
51+
- `"form.type.reset"`
52+
1953
FrameworkBundle
2054
---------------
2155

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66

77
* Added `Controller::json` to simplify creating JSON responses when using the Serializer component
88
* Deprecated absolute template paths support in the template name parser
9+
* Deprecated using core form types without dependencies as services
910

1011
3.0.0
1112
-----

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

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -66,95 +66,95 @@
6666
<tag name="form.type" />
6767
</service>
6868
<service id="form.type.birthday" class="Symfony\Component\Form\Extension\Core\Type\BirthdayType">
69-
<tag name="form.type" />
69+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
7070
</service>
7171
<service id="form.type.checkbox" class="Symfony\Component\Form\Extension\Core\Type\CheckboxType">
72-
<tag name="form.type" />
72+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
7373
</service>
7474
<service id="form.type.choice" class="Symfony\Component\Form\Extension\Core\Type\ChoiceType">
7575
<tag name="form.type" />
7676
<argument type="service" id="form.choice_list_factory"/>
7777
</service>
7878
<service id="form.type.collection" class="Symfony\Component\Form\Extension\Core\Type\CollectionType">
79-
<tag name="form.type" />
79+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
8080
</service>
8181
<service id="form.type.country" class="Symfony\Component\Form\Extension\Core\Type\CountryType">
82-
<tag name="form.type" />
82+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
8383
</service>
8484
<service id="form.type.date" class="Symfony\Component\Form\Extension\Core\Type\DateType">
85-
<tag name="form.type" />
85+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
8686
</service>
8787
<service id="form.type.datetime" class="Symfony\Component\Form\Extension\Core\Type\DateTimeType">
88-
<tag name="form.type" />
88+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
8989
</service>
9090
<service id="form.type.email" class="Symfony\Component\Form\Extension\Core\Type\EmailType">
91-
<tag name="form.type" />
91+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
9292
</service>
9393
<service id="form.type.file" class="Symfony\Component\Form\Extension\Core\Type\FileType">
94-
<tag name="form.type" />
94+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
9595
</service>
9696
<service id="form.type.hidden" class="Symfony\Component\Form\Extension\Core\Type\HiddenType">
97-
<tag name="form.type" />
97+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
9898
</service>
9999
<service id="form.type.integer" class="Symfony\Component\Form\Extension\Core\Type\IntegerType">
100-
<tag name="form.type" />
100+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
101101
</service>
102102
<service id="form.type.language" class="Symfony\Component\Form\Extension\Core\Type\LanguageType">
103-
<tag name="form.type" />
103+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
104104
</service>
105105
<service id="form.type.locale" class="Symfony\Component\Form\Extension\Core\Type\LocaleType">
106-
<tag name="form.type" />
106+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
107107
</service>
108108
<service id="form.type.money" class="Symfony\Component\Form\Extension\Core\Type\MoneyType">
109-
<tag name="form.type" />
109+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
110110
</service>
111111
<service id="form.type.number" class="Symfony\Component\Form\Extension\Core\Type\NumberType">
112-
<tag name="form.type" />
112+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
113113
</service>
114114
<service id="form.type.password" class="Symfony\Component\Form\Extension\Core\Type\PasswordType">
115-
<tag name="form.type" />
115+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
116116
</service>
117117
<service id="form.type.percent" class="Symfony\Component\Form\Extension\Core\Type\PercentType">
118-
<tag name="form.type" />
118+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
119119
</service>
120120
<service id="form.type.radio" class="Symfony\Component\Form\Extension\Core\Type\RadioType">
121-
<tag name="form.type" />
121+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
122122
</service>
123123
<service id="form.type.range" class="Symfony\Component\Form\Extension\Core\Type\RangeType">
124-
<tag name="form.type" />
124+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
125125
</service>
126126
<service id="form.type.repeated" class="Symfony\Component\Form\Extension\Core\Type\RepeatedType">
127-
<tag name="form.type" />
127+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
128128
</service>
129129
<service id="form.type.search" class="Symfony\Component\Form\Extension\Core\Type\SearchType">
130-
<tag name="form.type" />
130+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
131131
</service>
132132
<service id="form.type.textarea" class="Symfony\Component\Form\Extension\Core\Type\TextareaType">
133-
<tag name="form.type" />
133+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
134134
</service>
135135
<service id="form.type.text" class="Symfony\Component\Form\Extension\Core\Type\TextType">
136-
<tag name="form.type" />
136+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
137137
</service>
138138
<service id="form.type.time" class="Symfony\Component\Form\Extension\Core\Type\TimeType">
139-
<tag name="form.type" />
139+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
140140
</service>
141141
<service id="form.type.timezone" class="Symfony\Component\Form\Extension\Core\Type\TimezoneType">
142-
<tag name="form.type" />
142+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
143143
</service>
144144
<service id="form.type.url" class="Symfony\Component\Form\Extension\Core\Type\UrlType">
145-
<tag name="form.type" />
145+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
146146
</service>
147147
<service id="form.type.button" class="Symfony\Component\Form\Extension\Core\Type\ButtonType">
148-
<tag name="form.type" />
148+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
149149
</service>
150150
<service id="form.type.submit" class="Symfony\Component\Form\Extension\Core\Type\SubmitType">
151-
<tag name="form.type" />
151+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
152152
</service>
153153
<service id="form.type.reset" class="Symfony\Component\Form\Extension\Core\Type\ResetType">
154-
<tag name="form.type" />
154+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
155155
</service>
156156
<service id="form.type.currency" class="Symfony\Component\Form\Extension\Core\Type\CurrencyType">
157-
<tag name="form.type" />
157+
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated>
158158
</service>
159159

160160
<!-- FormTypeHttpFoundationExtension -->

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy