From 41c11aa981e56b508002c936e349285146961b93 Mon Sep 17 00:00:00 2001 From: Denys Voronin Date: Wed, 16 Oct 2019 13:30:11 +0300 Subject: [PATCH] [Config] Disable default alphabet sorting in glob function due of unstable sort --- src/Symfony/Component/Config/Resource/GlobResource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Config/Resource/GlobResource.php b/src/Symfony/Component/Config/Resource/GlobResource.php index 1edd7cd22e44a..5dafd4a4b9c7b 100644 --- a/src/Symfony/Component/Config/Resource/GlobResource.php +++ b/src/Symfony/Component/Config/Resource/GlobResource.php @@ -94,7 +94,7 @@ public function getIterator() } if (false === strpos($this->pattern, '/**/') && (defined('GLOB_BRACE') || false === strpos($this->pattern, '{'))) { - foreach (glob($this->prefix.$this->pattern, defined('GLOB_BRACE') ? GLOB_BRACE : 0) as $path) { + foreach (glob($this->prefix.$this->pattern, (defined('GLOB_BRACE') ? GLOB_BRACE : 0) | (defined('GLOB_NOSORT') ? GLOB_NOSORT : 0)) as $path) { if ($this->recursive && is_dir($path)) { $files = iterator_to_array(new \RecursiveIteratorIterator( new \RecursiveCallbackFilterIterator(