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] Restore default locale in ConstraintValidatorTestCase#44473

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
fancyweb merged 1 commit intosymfony:4.4fromowsy:validator-locale
Dec 17, 2021
Merged

[Validator] Restore default locale in ConstraintValidatorTestCase#44473

fancyweb merged 1 commit intosymfony:4.4fromowsy:validator-locale
Dec 17, 2021

Conversation

@rodnaph
Copy link
Contributor

QA
Branch?6.1
Bug fix?yes
New feature?no
Deprecations?no
TicketsN/A
LicenseMIT
Doc PRN/A

Previously this code was not resetting the locale after changing it toen - which affected other tests which relied on this value being the configured value (however it was configured).

This mirrors the pattern used for the timezone, storing it to be reset on tearDown.

I've based this on 6.1. If it's valid, I'm unsure if it's classed a bug, or needs UPGRADE notes?

@carsonbot
Copy link

It looks like you unchecked the "Allow edits from maintainer" box. That is fine, but please note that if you have multiple commits, you'll need to squash your commits into one before this can be merged. Or, you can check the "Allow edits from maintainers" box and the maintainer can squash for you.

Cheers!

Carsonbot

protected$propertyPath;
protected$constraint;
protected$defaultTimezone;
protectedstring$locale;
Copy link
Member

Choose a reason for hiding this comment

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

the property should be defined asprotected ?string $locale = null, or the check line 124 needs to be changed

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I agree, thanks.

@fancyweb
Copy link
Contributor

I think it's a bug and you should target 4.4. You can take inspiration fromhttps://github.com/symfony/symfony/pull/40932/files. Also, I'm not sure we need protected methods for that.

yceruto and derrabus reacted with thumbs up emoji

@rodnaph
Copy link
ContributorAuthor

I think it's a bug and you should target 4.4. You can take inspiration fromhttps://github.com/symfony/symfony/pull/40932/files. Also, I'm not sure we need protected methods for that.

Happy to rebase if that's needed, let me know. I added the protected methods to follow the same pattern as used to manage the timezone, can change that if it's overkill though.

@xabbuh
Copy link
Member

I agree with@fancyweb about this being a bugfix.

@carsonbotcarsonbot changed the titleReset Validator Locale[Validator] Reset Validator LocaleDec 13, 2021
@derrabus
Copy link
Member

Let's merge to 4.4. 👍🏻

@rodnaphrodnaph changed the base branch from6.1 to4.4December 15, 2021 23:01
… configured valuePreviously this change was not resetting the locale after changing it to'en' - which affected other tests which relied on this value being theconfigured value (however it was configured).This mirrors the pattern used for the timezone, storing it to be reseton tearDown.
@rodnaph
Copy link
ContributorAuthor

Rebased on 4.4, withsuggested updates.

@fancywebfancyweb changed the title[Validator] Reset Validator Locale[Validator] Restore default locale in ConstraintValidatorTestCaseDec 17, 2021
@fancyweb
Copy link
Contributor

Thank you@rodnaph.

@fancywebfancyweb merged commitf91c40a intosymfony:4.4Dec 17, 2021
This was referencedDec 29, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ycerutoycerutoyceruto requested changes

@xabbuhxabbuhxabbuh approved these changes

@stofstofAwaiting requested review from stof

+1 more reviewer

@fancywebfancywebfancyweb approved these changes

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.

7 participants

@rodnaph@carsonbot@fancyweb@xabbuh@derrabus@stof@yceruto

[8]ページ先頭

©2009-2025 Movatter.jp