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

Commitce48fbe

Browse files
feature#52193 [PhpUnitBridge] Allow setting the locale using SYMFONY_PHPUNIT_LOCALE env var (VincentLanglet)
This PR was squashed before being merged into the 6.4 branch.Discussion----------[PhpUnitBridge] Allow setting the locale using SYMFONY_PHPUNIT_LOCALE env var| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | yes| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets |Fix#52185| License | MITcc `@nicolas`-grekasCommits-------2954468 [PhpUnitBridge] Allow setting the locale using SYMFONY_PHPUNIT_LOCALE env var
2 parents3df3372 +2954468 commitce48fbe

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

‎src/Symfony/Bridge/PhpUnit/CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
6.4
5+
---
6+
7+
* Allow setting the locale using`SYMFONY_PHPUNIT_LOCALE` env var
8+
49
6.3
510
---
611

‎src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ class SymfonyTestsListenerTrait
5050
*/
5151
publicfunction__construct(array$mockedNamespaces = [])
5252
{
53+
setlocale(\LC_ALL,$_ENV['SYMFONY_PHPUNIT_LOCALE'] ??'C');
54+
5355
if (class_exists(ExcludeList::class)) {
5456
(newExcludeList())->getExcludedDirectories();
5557
ExcludeList::addDirectory(\dirname((new \ReflectionClass(__CLASS__))->getFileName(),2));

‎src/Symfony/Bridge/PhpUnit/bootstrap.php‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
unset($GLOBALS['__composer_autoload_files'][$fileIdentifier]);
3030
}
3131

32-
// Enforce a consistent locale
33-
setlocale(\LC_ALL,'C');
34-
3532
if (class_exists(Deprecation::class)) {
3633
Deprecation::withoutDeduplication();
3734

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp