From ef0a61376c5b06a0f29cfc3e634eaafbff4cdac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20L=C3=A9v=C3=AAque?= Date: Thu, 23 Apr 2026 10:03:13 +0200 Subject: [PATCH] fix: sort YAML config files by name for deterministic schema order Symfony Finder returns files in filesystem readdir order, which differs between filesystems (APFS/VirtioFS on macOS Docker Desktop vs ext4 on a Linux CI runner). Running graphql:dump-schema on two different platforms can therefore produce two valid schemas that only differ in the order of fields and type declarations, which breaks 'git diff --exit-code' checks on schema.graphql even when no source change was made. Add ->sortByName() so the discovery order is stable and platform-independent. --- src/DependencyInjection/Compiler/ConfigParserPass.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }