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] Fix the locale validator so it treats a locale alias as a valid locale#18049

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:2.3fromjakzal:validator-locale-alias
Mar 8, 2016

Conversation

@jakzal
Copy link
Contributor

QA
Branch2.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#12583
LicenseMIT
Doc PR-

"doctrine/common":"~2.3",
"symfony/http-foundation":"~2.1",
"symfony/intl":"~2.3",
"symfony/intl":"^2.3.21",
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

LocaleBundle::getAliases() was introduced in Symfony 2.3.21. Without thistests with--prefer-lowest fail.

$aliases = Intl::getLocaleBundle()->getAliases();

if (!isset($locales[$value])) {
if (!isset($locales[$value]) && !array_search($value,$aliases)) {
Copy link
Member

Choose a reason for hiding this comment

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

As we are not interested in the index wouldn't it be make sense to usein_array() instead?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Obviously :)

@xabbuh
Copy link
Member

👍

Status: Reviewed

@webmozart
Copy link
Contributor

👍

@fabpot
Copy link
Member

Thank you@jakzal.

@fabpotfabpot merged commitfbb12d8 intosymfony:2.3Mar 8, 2016
fabpot added a commit that referenced this pull requestMar 8, 2016
… alias as a valid locale (jakzal)This PR was merged into the 2.3 branch.Discussion----------[Validator] Fix the locale validator so it treats a locale alias as a valid locale| Q             | A| ------------- | ---| Branch        | 2.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#12583| License       | MIT| Doc PR        | -Commits-------fbb12d8 [Validator] Fix the locale validator so it treats a locale alias as a valid locale
@jakzaljakzal deleted the validator-locale-alias branchMarch 8, 2016 08:20
@fabpotfabpot mentioned this pull requestMar 13, 2016
This was referencedMar 25, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@jakzal@xabbuh@webmozart@fabpot@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp