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

[PHPUnitBridge] Allow setting the locale usingSYMFONY_PHPUNIT_LOCALE env var#19089

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

Conversation

@alexandre-daubois
Copy link
Member

@carsonbotcarsonbot added this to the6.4 milestoneOct 27, 2023
@carsonbotcarsonbot changed the title[PhpUnitBridge] Allow setting the locale usingSYMFONY_PHPUNIT_LOCALE env var[PHPUnitBridge] Allow setting the locale usingSYMFONY_PHPUNIT_LOCALE env varOct 27, 2023
@OskarStark
Copy link
Contributor

Thank you Alexandre.

@OskarStarkOskarStark merged commit89e63a1 intosymfony:6.4Oct 27, 2023
@VincentLanglet
Copy link
Contributor

Would it be worth adding that

<env name="SYMFONY_PHPUNIT_LOCALE" value="0"/>

disable the behavior, since

setlocale(\LC_ALL, 0);

returns the locale instead of setting it

@alexandre-daubois
Copy link
MemberAuthor

I'm not sure, because this is something that touches the internals of the bridge, which we do not document. Also, if someone wants to disable this new behavior, it'll remove the env var I guess. So I'm not sure this is something we should add as it may bring more confusion than anything else 🤔

@VincentLanglet
Copy link
Contributor

Also, if someone wants to disable this new behavior, it'll remove the env var I guess.

No, removing the env var won't disable the behavior, it will set the default?? 'C' locale which doesn't solve my issuesymfony/symfony#52185

By default the bridge set a consistent locale and there was no way to avoid this behavior.
The suggestion was to introduce a env var to disable the behavior:
symfony/symfony#52185 (comment)

Then, we added the feature to select another local.
But personally the reason I introduce this was to disable the feature.

When looking at the bridge issues, some people were complaining about the fact a locale was set, but none complained about the locale set. So this feature might be used more often to disable the behavior rather than changing the locale.

OskarStark added a commit that referenced this pull requestOct 30, 2023
… by the bridge (alexandre-daubois)This PR was merged into the 6.4 branch.Discussion----------[PHPUnitBridge] Add a note to disable the locale forcing by the bridgeFollowing#19089 (comment), cc `@VincentLanglet` 🙂Commits-------226b0ed [PHPUnitBridge] Add a note to disable the locale forcing by the bridge
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

6.4

Development

Successfully merging this pull request may close these issues.

[PhpUnitBridge] Allow setting the locale using SYMFONY_PHPUNIT_LOCALE e…

4 participants

@alexandre-daubois@OskarStark@VincentLanglet@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp