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
Denys Voronin committed Oct 16, 2019
1 parent f3ac9f5 commit 41c11aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Config/Resource/GlobResource.php
Expand Up @@ -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(
Expand Down

0 comments on commit 41c11aa

Please sign in to comment.