Skip to content

Commit e440baa

Browse files
committed
Merge branch '4.2'
* 4.2: Debug finalized config in debug:config
2 parents bc457d3 + 9a46529 commit e440baa

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Compiler/ValidateEnvPlaceholdersPass.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,15 @@ class ValidateEnvPlaceholdersPass implements CompilerPassInterface
2828
{
2929
private static $typeFixtures = ['array' => [], 'bool' => false, 'float' => 0.0, 'int' => 0, 'string' => ''];
3030

31+
private $extensionConfig = [];
32+
3133
/**
3234
* {@inheritdoc}
3335
*/
3436
public function process(ContainerBuilder $container)
3537
{
38+
$this->extensionConfig = [];
39+
3640
if (!class_exists(BaseNode::class) || !$extensions = $container->getExtensions()) {
3741
return;
3842
}
@@ -77,7 +81,7 @@ public function process(ContainerBuilder $container)
7781
}
7882

7983
try {
80-
$processor->processConfiguration($configuration, $config);
84+
$this->extensionConfig[$name] = $processor->processConfiguration($configuration, $config);
8185
} catch (TreeWithoutRootNodeException $e) {
8286
}
8387
}
@@ -88,6 +92,18 @@ public function process(ContainerBuilder $container)
8892
$resolvingBag->clearUnusedEnvPlaceholders();
8993
}
9094

95+
/**
96+
* @internal
97+
*/
98+
public function getExtensionConfig(): array
99+
{
100+
try {
101+
return $this->extensionConfig;
102+
} finally {
103+
$this->extensionConfig = [];
104+
}
105+
}
106+
91107
private static function getType($value): string
92108
{
93109
switch ($type = \gettype($value)) {

0 commit comments

Comments
 (0)