Skip to content

Commit df90ef0

Browse files
committed
Define default configs by constant instead of static property
1 parent 1e0c084 commit df90ef0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/DependencyInjection/Compiler/ConfigParserPass.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ConfigParserPass implements CompilerPassInterface
5252
'attribute' => AttributeParser::class,
5353
];
5454

55-
private static array $defaultDefaultConfig = [
55+
private const DEFAULT_CONFIG = [
5656
'definitions' => [
5757
'mappings' => [
5858
'auto_discover' => [
@@ -65,6 +65,12 @@ class ConfigParserPass implements CompilerPassInterface
6565
],
6666
];
6767

68+
/**
69+
* @deprecated Use {@see ConfigParserPass::PARSERS }. Added for the backward compatibility.
70+
* @var array<string,array<string,mixed>>
71+
*/
72+
private static array $defaultDefaultConfig = self::DEFAULT_CONFIG;
73+
6874
private array $treatedFiles = [];
6975
private array $preTreatedFiles = [];
7076

@@ -170,7 +176,7 @@ private function checkTypesDuplication(array $typeConfigs): void
170176
private function mappingConfig(array $config, ContainerBuilder $container): array
171177
{
172178
// use default value if needed
173-
$config = array_replace_recursive(self::$defaultDefaultConfig, $config);
179+
$config = array_replace_recursive(self::DEFAULT_CONFIG, $config);
174180

175181
$mappingConfig = $config['definitions']['mappings'];
176182
$typesMappings = $mappingConfig['types'];

0 commit comments

Comments
 (0)