Skip to content

Commit bb32456

Browse files
committed
bug #1314 [TwigComponent] Allow Bundle configuration with PHP ConfigBuilder (smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [TwigComponent] Allow Bundle configuration with PHP ConfigBuilder | Q | A | ------------- | --- | Bug fix? | yes/no | New feature? | yes/no | Issues | Fix #1304 | License | MIT Allow TwigComponent configuration via configbuilder. Commits ------- 71d09ad [TwigComponent] Allow Bundle configuration with PHP ConfigBuilder
2 parents 4e0b7ad + 71d09ad commit bb32456

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/TwigComponent/src/DependencyInjection/TwigComponentExtension.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ public function load(array $configs, ContainerBuilder $container): void
5353
throw new LogicException('The TwigBundle is not registered in your application. Try running "composer require symfony/twig-bundle".');
5454
}
5555

56-
$config = $this->processConfiguration($this, $configs);
56+
$configuration = $this->getConfiguration($configs, $container);
57+
$config = $this->processConfiguration($configuration, $configs);
5758
$defaults = $config['defaults'];
5859
if ($defaults === [self::DEPRECATED_DEFAULT_KEY]) {
5960
trigger_deprecation('symfony/ux-twig-component', '2.13', 'Not setting the "twig_component.defaults" config option is deprecated. Check the documentation for an example configuration.');
@@ -188,4 +189,9 @@ public function getConfigTreeBuilder(): TreeBuilder
188189

189190
return $treeBuilder;
190191
}
192+
193+
public function getConfiguration(array $config, ContainerBuilder $container): ConfigurationInterface
194+
{
195+
return $this;
196+
}
191197
}

0 commit comments

Comments
 (0)