Skip to content

Commit

Permalink
[Config] Disable default alphabet sorting in glob function due of uns…
Browse files Browse the repository at this point in the history
…table sort
  • Loading branch information
hurricane-voronin committed Oct 16, 2019
1 parent 29cabf9 commit 49d06a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Symfony/Component/Config/Resource/GlobResource.php
Expand Up @@ -100,7 +100,9 @@ public function getIterator()
}

if (0 !== strpos($this->prefix, 'phar://') && 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) {
$paths = glob($this->prefix.$this->pattern, GLOB_NOSORT | (\defined('GLOB_BRACE') ? GLOB_BRACE : 0));
sort($paths);
foreach ($paths as $path) {
if ($this->recursive && is_dir($path)) {
$files = iterator_to_array(new \RecursiveIteratorIterator(
new \RecursiveCallbackFilterIterator(
Expand Down

0 comments on commit 49d06a6

Please sign in to comment.