Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)
This commit is contained in:
@@ -14,16 +14,16 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
abstract class AbstractPluginExtension extends Extension
|
||||
{
|
||||
protected function registerBundleConfiguration(ContainerBuilder $container, array $configs)
|
||||
protected function registerBundleConfiguration(ContainerBuilder $container, array $configs): void
|
||||
{
|
||||
$bundleConfig = [$this->getAlias() => $configs];
|
||||
|
||||
/* @phpstan-ignore-next-line */
|
||||
if ($container->hasParameter('kimai.bundles.config')) {
|
||||
$bundleConfig = array_merge(
|
||||
$container->getParameter('kimai.bundles.config'),
|
||||
$bundleConfig
|
||||
);
|
||||
if ($container->hasParameter('kimai.bundles.config')) { // @phpstan-ignore-line
|
||||
$config = $container->getParameter('kimai.bundles.config');
|
||||
if (!\is_array($config)) {
|
||||
throw new \Exception('Invalid bundle configuration registered for ' . $this->getAlias());
|
||||
}
|
||||
$bundleConfig = array_merge($config, $bundleConfig);
|
||||
}
|
||||
|
||||
$container->setParameter('kimai.bundles.config', $bundleConfig);
|
||||
|
||||
Reference in New Issue
Block a user