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

[Validator] Add BC layer for notInRangeMessage when min and max are set#36140

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

Merged
fabpot merged 1 commit intosymfony:4.4froml-vo:add_bc_layer_range_message_change
Aug 12, 2020

Conversation

@l-vo
Copy link
Contributor

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#36133
LicenseMIT
Doc PR

According to#36133, the improvement added in#32435 may lead to a BC break when the developer passmin andmax options and a customminMessage ormaxMessage. In this case it's expected to receive aminMessage/maxMessage in the violation but anotInRangeMessage is received instead.

So in the following conditions:

  • min andmax options are set
  • minMessage ormaxMessage is set

A deprecation is triggered. If a limit is violated and matches to the min/max message passed as option (minMessage formin violated andmaxMessage formax violated),minMessage/maxMessage is used in the violation instead ofnotInRangeMessage.

@dmaicher
Copy link
Contributor

Also see#33700

I also noticed that and back then we decided to document this small behavior change.

@l-vol-voforce-pushed theadd_bc_layer_range_message_change branch 2 times, most recently from2d50ed1 tof12794eCompareMarch 19, 2020 12:07
@nicolas-grekasnicolas-grekas added this to thenext milestoneMar 19, 2020
@l-vol-voforce-pushed theadd_bc_layer_range_message_change branch 2 times, most recently fromd8f0c3f to1136014CompareMarch 19, 2020 21:05
@chalasr
Copy link
Member

Adding a BC layer on a maintenance branch feels wrong to me, you shouldn't get new deprecation notices in a patch release. The BC break should either be reverted or documented instead.

HeahDude, ogizanagi, and dmaicher reacted with thumbs up emoji

@l-vol-voforce-pushed theadd_bc_layer_range_message_change branch from1136014 todc9a366CompareMarch 21, 2020 09:58
@l-vol-voforce-pushed theadd_bc_layer_range_message_change branch fromdc9a366 to092d85cCompareMarch 21, 2020 10:00
@nicolas-grekas
Copy link
Member

The BC break should either be reverted or documented instead

Reverting would mean breaking BC on 5.0 - Documenting is what this PR is about.
If we missed triggering a deprecation while something has been deprecated, adding this deprecation is a bug fix to me.

Note that I didn't get the patch so I'm just commenting on the process :)

@xabbuhxabbuh modified the milestones:next,4.4Apr 1, 2020
@fabpot
Copy link
Member

@l-vo What's the status here?

@l-vo
Copy link
ContributorAuthor

@fabpot from my point of view the fix itself is finished, the blocking point is more a discussion between contributors/core members about what should be done here.

@fabpot
Copy link
Member

Thank you@l-vo.

@fabpotfabpot merged commitf3753e9 intosymfony:4.4Aug 12, 2020
@fabpot
Copy link
Member

@l-vo I've merge 4.4 into 5.1, can you create a PR for 5.1 where you remove the BC layer?

@l-vo
Copy link
ContributorAuthor

Of course, I'm AFAK today but I'm doing it tomorrow.

dmaicher reacted with thumbs up emoji

fabpot added a commit that referenced this pull requestAug 12, 2020
This PR was merged into the 4.4 branch.Discussion----------[Validator] RangeTest: fix expected deprecation| Q             | A| ------------- | ---| Branch?       | 4.4| Bug fix?      | no| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets       |#36140 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->| License       | MIT| Doc PR        | N/AFixeshttps://travis-ci.org/github/symfony/symfony/jobs/717184009#L5830-L5831Commits-------33c8c3a [Validator] RangeTest: fix expected deprecation
@l-vol-vo deleted the add_bc_layer_range_message_change branchAugust 12, 2020 17:12
@l-vo
Copy link
ContributorAuthor

@fabpot Do we really want to remove the BC layer in 5.x ? In the early 5.0 and 5.1 versions, the behavior ofRange changed but no deprecations was triggered. If the BC layer is removed now, some users of 5.0 and 5.1 will never be noticed that the behavior has changed. Removing it in 6.0 will allow all the users to be noticed. What is your point of view about that please ? All users must be noticed or it's and edge case with minor impact and it can be removed right now ?

@fabpot
Copy link
Member

@l-vo Right, let's remove it for 6.0.

This was referencedAug 31, 2020
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

@stofstofstof left review comments

@xabbuhxabbuhxabbuh left review comments

@fabpotfabpotfabpot approved these changes

+2 more reviewers

@dmaicherdmaicherdmaicher left review comments

@HeahDudeHeahDudeHeahDude left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

9 participants

@l-vo@dmaicher@chalasr@nicolas-grekas@fabpot@stof@xabbuh@HeahDude@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp