diff --git a/src/bundle/Core/DependencyInjection/Configuration.php b/src/bundle/Core/DependencyInjection/Configuration.php index 18f2c8823a..8595eca52f 100644 --- a/src/bundle/Core/DependencyInjection/Configuration.php +++ b/src/bundle/Core/DependencyInjection/Configuration.php @@ -48,6 +48,15 @@ public function getConfigTreeBuilder(): TreeBuilder $rootNode = $treeBuilder->getRootNode(); + $rootNode + ->children() + ->booleanNode('strict_mode') + ->info('Enable strict mode. If enabled, certain misconfiguration issues that allowed fallback will throw an exception.') + ->defaultValue('%kernel.debug%') + ->end() + ->end() + ; + $this->addRepositoriesSection($rootNode); $this->addSiteAccessSection($rootNode); $this->addImageMagickSection($rootNode); diff --git a/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php b/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php index bef09cc94d..aa93c6b717 100644 --- a/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php +++ b/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php @@ -118,6 +118,8 @@ public function load(array $configs, ContainerBuilder $container): void // Note: this is where the transformation occurs $config = $this->processConfiguration($configuration, $configs); + $container->setParameter('ibexa.strict_mode', $config['strict_mode'] ?? false); + // Base services and services overrides $loader->load('services.yml'); // Security services