Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Form] Add upgrade path for empty_data option in TextType#41516

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
peter-gribanov wants to merge10 commits intosymfony:7.4
base:7.4
Choose a base branch
Loading
frompeter-gribanov:form_text_type_stringable_upgrade

Conversation

peter-gribanov
Copy link
Contributor

@peter-gribanovpeter-gribanov commentedJun 2, 2021
edited
Loading

QA
Branch?6.2
Bug fix?no
New feature?no
Deprecations?yes
LicenseMIT
Doc PRsymfony/symfony-docs#15404

Upgrade path for#41514

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Having all those test cases marked as legacy looks suspicious to me. Should they all really be removed in 6.0? If not, how should they look like then?

@peter-gribanovpeter-gribanovforce-pushed theform_text_type_stringable_upgrade branch frome103ebb to4a44fb6CompareJune 3, 2021 09:34
@peter-gribanov
Copy link
ContributorAuthor

Having all those test cases marked as legacy looks suspicious to me. Should they all really be removed in 6.0? If not, how should they look like then?

@nicolas-grekas I am trying to solve theproblem in tests. What is the best way to do this?

Remaining self deprecation notices (575)

@xabbuh
Copy link
Member

Marking all these tests as legacy is not the way to go. Instead all the tests should be updated the same way an Symfony user would have to update their code to keep the existing behavior when this PR is merged.

This will allow us to let the tests show us the impact the proposed change has on our users and we can use it as a base for a discussion about whether or not this is worth it.

@nicolas-grekasnicolas-grekas added this to the5.4 milestoneJun 7, 2021
@peter-gribanovpeter-gribanovforce-pushed theform_text_type_stringable_upgrade branch from57ea40c to7d9556eCompareJune 7, 2021 15:55
@@ -27,6 +27,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
// See https://github.com/symfony/symfony/issues/5906#issuecomment-203189375
if ('' === $options['empty_data']) {
$builder->addViewTransformer($this);
} elseif (FormType::$emptyData === $options['empty_data']) {
// "empty_data" option is the default value from FormType::configureOptions()
trigger_deprecation('symfony/form', '5.4', 'The default value of "empty_data" option in "%s" will be changed to empty string. Declare "NULL" as value for "empty_data" if you still want use "NULL" as data.', __CLASS__);
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

To ensure that this is the default closure and not the user-specified one, we must compare the provided closure with the default closure. To do this, the default closure must be created once and be accessible from the outside.

@peter-gribanovpeter-gribanovforce-pushed theform_text_type_stringable_upgrade branch from31f105e to52279c4CompareJune 7, 2021 16:12
@peter-gribanov
Copy link
ContributorAuthor

@xabbuh If we want to keep the old behavior, then we must pass optionempty_data => NULL. In the major version#41514, it would be better to rewrite the behavior.

@peter-gribanovpeter-gribanovforce-pushed theform_text_type_stringable_upgrade branch from52279c4 toed68472CompareJune 9, 2021 07:30
@peter-gribanovpeter-gribanovforce-pushed theform_text_type_stringable_upgrade branch fromed68472 to2306c3aCompareJuly 15, 2021 10:04
@fabpot
Copy link
Member

What's the status here?

@fabpotfabpot modified the milestones:5.4,6.1Nov 16, 2021
@peter-gribanovpeter-gribanovforce-pushed theform_text_type_stringable_upgrade branch 3 times, most recently from643286f tof1c43f9CompareNovember 18, 2021 15:59
@peter-gribanov
Copy link
ContributorAuthor

What's the status here?

@fabpot needs review

@fabpotfabpot modified the milestones:6.1,6.2May 20, 2022
@peter-gribanovpeter-gribanovforce-pushed theform_text_type_stringable_upgrade branch 3 times, most recently froma1be371 to2d9849fCompareSeptember 27, 2022 13:28
@peter-gribanovpeter-gribanovforce-pushed theform_text_type_stringable_upgrade branch from2d9849f tofa0328dCompareSeptember 27, 2022 13:32
@nicolas-grekasnicolas-grekas modified the milestones:6.2,6.3Nov 5, 2022
@nicolas-grekasnicolas-grekas modified the milestones:6.3,6.4May 23, 2023
@nicolas-grekasnicolas-grekas modified the milestones:6.4,7.1Nov 15, 2023
@xabbuhxabbuh modified the milestones:7.1,7.2May 15, 2024
@fabpotfabpot modified the milestones:7.2,7.3Nov 20, 2024
@fabpotfabpot modified the milestones:7.3,7.4May 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@xabbuhxabbuhAwaiting requested review from xabbuhxabbuh is a code owner

@ycerutoycerutoAwaiting requested review from ycerutoyceruto is a code owner

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

@wouterjwouterjAwaiting requested review from wouterj

@stofstofAwaiting requested review from stof

Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

6 participants
@peter-gribanov@xabbuh@fabpot@nicolas-grekas@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp