Skip to content

Commit 9eca5fd

Browse files
ENGCOM-6038: DI Compile - Sort DI metadata output to make diff between builds easier #24898
- Merge Pull Request #24898 from ven-com/magento2:2.3-sort-di-compile-metadata - Merged commits: 1. 5861423 2. c0438db
2 parents ff2fa21 + c0438db commit 9eca5fd

File tree

1 file changed

+8
-1
lines changed
  • setup/src/Magento/Setup/Module/Di/Compiler/Config

1 file changed

+8
-1
lines changed

setup/src/Magento/Setup/Module/Di/Compiler/Config/Reader.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
/**
1717
* Class Reader
18+
*
1819
* @package Magento\Setup\Module\Di\Compiler\Config
1920
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2021
*/
@@ -84,7 +85,7 @@ public function generateCachePerScope(
8485
}
8586

8687
$config = [];
87-
88+
8889
$this->fillThirdPartyInterfaces($areaConfig, $definitionsCollection);
8990
$config['arguments'] = $this->getConfigForScope($definitionsCollection, $areaConfig);
9091

@@ -98,6 +99,12 @@ public function generateCachePerScope(
9899
foreach (array_keys($areaConfig->getVirtualTypes()) as $virtualType) {
99100
$config['instanceTypes'][$virtualType] = $areaConfig->getInstanceType($virtualType);
100101
}
102+
103+
// sort configuration to have it in the same order on every build
104+
ksort($config['arguments']);
105+
ksort($config['preferences']);
106+
ksort($config['instanceTypes']);
107+
101108
return $config;
102109
}
103110

0 commit comments

Comments
 (0)