diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c42e79..a8be658 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +6.4 +--- + + * Allow setting the locale using `SYMFONY_PHPUNIT_LOCALE` env var + 6.3 --- diff --git a/Legacy/SymfonyTestsListenerTrait.php b/Legacy/SymfonyTestsListenerTrait.php index 62e57b8..aa33500 100644 --- a/Legacy/SymfonyTestsListenerTrait.php +++ b/Legacy/SymfonyTestsListenerTrait.php @@ -50,6 +50,8 @@ class SymfonyTestsListenerTrait */ public function __construct(array $mockedNamespaces = []) { + setlocale(\LC_ALL, $_ENV['SYMFONY_PHPUNIT_LOCALE'] ?? 'C'); + if (class_exists(ExcludeList::class)) { (new ExcludeList())->getExcludedDirectories(); ExcludeList::addDirectory(\dirname((new \ReflectionClass(__CLASS__))->getFileName(), 2)); diff --git a/bootstrap.php b/bootstrap.php index 2541cdd..f11b7ab 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -29,9 +29,6 @@ unset($GLOBALS['__composer_autoload_files'][$fileIdentifier]); } -// Enforce a consistent locale -setlocale(\LC_ALL, 'C'); - if (class_exists(Deprecation::class)) { Deprecation::withoutDeduplication();