-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Deprecated form types as services #18343
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,94 +67,123 @@ | |
</service> | ||
<service id="form.type.birthday" class="Symfony\Component\Form\Extension\Core\Type\BirthdayType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.checkbox" class="Symfony\Component\Form\Extension\Core\Type\CheckboxType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.choice" class="Symfony\Component\Form\Extension\Core\Type\ChoiceType"> | ||
<tag name="form.type" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please don't change the order. It makes merging branches harder There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. even in master ? |
||
<argument type="service" id="form.choice_list_factory"/> | ||
</service> | ||
<service id="form.type.collection" class="Symfony\Component\Form\Extension\Core\Type\CollectionType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.country" class="Symfony\Component\Form\Extension\Core\Type\CountryType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.date" class="Symfony\Component\Form\Extension\Core\Type\DateType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.datetime" class="Symfony\Component\Form\Extension\Core\Type\DateTimeType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.email" class="Symfony\Component\Form\Extension\Core\Type\EmailType"> | ||
<tag name="form.type" /> | ||
<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"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.hidden" class="Symfony\Component\Form\Extension\Core\Type\HiddenType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.integer" class="Symfony\Component\Form\Extension\Core\Type\IntegerType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.language" class="Symfony\Component\Form\Extension\Core\Type\LanguageType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.locale" class="Symfony\Component\Form\Extension\Core\Type\LocaleType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.money" class="Symfony\Component\Form\Extension\Core\Type\MoneyType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.number" class="Symfony\Component\Form\Extension\Core\Type\NumberType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.password" class="Symfony\Component\Form\Extension\Core\Type\PasswordType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.percent" class="Symfony\Component\Form\Extension\Core\Type\PercentType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.radio" class="Symfony\Component\Form\Extension\Core\Type\RadioType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.range" class="Symfony\Component\Form\Extension\Core\Type\RangeType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.repeated" class="Symfony\Component\Form\Extension\Core\Type\RepeatedType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.search" class="Symfony\Component\Form\Extension\Core\Type\SearchType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.textarea" class="Symfony\Component\Form\Extension\Core\Type\TextareaType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.text" class="Symfony\Component\Form\Extension\Core\Type\TextType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.time" class="Symfony\Component\Form\Extension\Core\Type\TimeType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.timezone" class="Symfony\Component\Form\Extension\Core\Type\TimezoneType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.url" class="Symfony\Component\Form\Extension\Core\Type\UrlType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.button" class="Symfony\Component\Form\Extension\Core\Type\ButtonType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.submit" class="Symfony\Component\Form\Extension\Core\Type\SubmitType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.reset" class="Symfony\Component\Form\Extension\Core\Type\ResetType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
<service id="form.type.currency" class="Symfony\Component\Form\Extension\Core\Type\CurrencyType"> | ||
<tag name="form.type" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
|
||
<!-- FormTypeHttpFoundationExtension --> | ||
|
@@ -179,9 +208,11 @@ | |
</service> | ||
<service id="form.type_extension.repeated.validator" class="Symfony\Component\Form\Extension\Validator\Type\RepeatedTypeValidatorExtension"> | ||
<tag name="form.type_extension" extended-type="Symfony\Component\Form\Extension\Core\Type\RepeatedType" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. type extensions cannot be deprecated (as they would not be registered anymore) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You cannot deprecate these services. If an extension is not registered, it cannot extend the logic of the form type (and there is no way to automatically discover extensions based on the form type class name) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @stof I don't think they have to since they don't have strict dependencies. Right ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please stop linking to form extensions to justify that these services are useless. As I already said many times, form extensions are NOT registered when using the fullstack framework, in favor of lazy-loading. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitely understood. Sorry for the confusion about this, thanks for clarifying it... again :) |
||
</service> | ||
<service id="form.type_extension.submit.validator" class="Symfony\Component\Form\Extension\Validator\Type\SubmitTypeValidatorExtension"> | ||
<tag name="form.type_extension" extended-type="Symfony\Component\Form\Extension\Core\Type\SubmitType" /> | ||
<deprecated>The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0.</deprecated> | ||
</service> | ||
</services> | ||
</container> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is still wrong for type extensions. Type extensions always need to be registered