diff --git a/src/DependencyInjection/Compiler/ConfigParserPass.php b/src/DependencyInjection/Compiler/ConfigParserPass.php index 3d5ecd308..e82dd7aee 100644 --- a/src/DependencyInjection/Compiler/ConfigParserPass.php +++ b/src/DependencyInjection/Compiler/ConfigParserPass.php @@ -257,7 +257,7 @@ private function detectFilesByTypes(ContainerBuilder $container, string $path, s foreach ($types as $type) { $finder = Finder::create(); try { - $finder->files()->in($path)->name(sprintf('*%s.%s', $suffix, self::SUPPORTED_TYPES_EXTENSIONS[$type])); + $finder->files()->in($path)->name(sprintf('*%s.%s', $suffix, self::SUPPORTED_TYPES_EXTENSIONS[$type]))->sortByName(); } catch (InvalidArgumentException $e) { continue; }