diff --git a/composer.json b/composer.json index 85047e2..846f3c2 100644 --- a/composer.json +++ b/composer.json @@ -8,14 +8,13 @@ }, "require": { "php": " >=8.3", - "ibexa/core": "~5.0.x-dev", - "ibexa/design-engine": "~5.0.x-dev", - "symfony/http-kernel": "^5.0" + "ibexa/core": "dev-ibx-8470-symfony-6 as 5.0.x-dev", + "ibexa/design-engine": "dev-ibx-8470-symfony-6 as 5.0.x-dev", + "symfony/http-kernel": "^6.4" }, "require-dev": { - "ibexa/ci-scripts": "^0.2@dev", "ibexa/code-style": "~2.0.0", - "ibexa/doctrine-schema": "~5.0.x-dev", + "ibexa/doctrine-schema": "dev-ibx-8470-symfony-6 as 5.0.x-dev", "matthiasnoback/symfony-dependency-injection-test": "^4.1", "phpunit/phpunit": "^9.6" }, diff --git a/src/bundle/DependencyInjection/Compiler/KernelOverridePass.php b/src/bundle/DependencyInjection/Compiler/KernelOverridePass.php index 0c2fdde..aab5f28 100644 --- a/src/bundle/DependencyInjection/Compiler/KernelOverridePass.php +++ b/src/bundle/DependencyInjection/Compiler/KernelOverridePass.php @@ -22,11 +22,9 @@ class KernelOverridePass implements CompilerPassInterface /** * Load Standard Design configuration which overrides Ibexa DXP Core setup. * - * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container - * * @throws \Exception */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { $overrideTemplates = $container->getParameter( IbexaStandardDesignExtension::OVERRIDE_KERNEL_TEMPLATES_PARAM_NAME @@ -36,7 +34,7 @@ public function process(ContainerBuilder $container) $container, new FileLocator(__DIR__ . '/../../Resources/config') ); - $loader->load('override/ezpublish.yaml'); + $loader->load('override/ibexa.yaml'); } $this->setStandardThemeDirectories($container); @@ -47,7 +45,7 @@ public function process(ContainerBuilder $container) * * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - private function setStandardThemeDirectories(ContainerBuilder $container) + private function setStandardThemeDirectories(ContainerBuilder $container): void { if (!$container->hasParameter('kernel.bundles_metadata')) { return; @@ -59,6 +57,7 @@ private function setStandardThemeDirectories(ContainerBuilder $container) return; } + /** @var array $templatesPathMap */ $templatesPathMap = $container->hasParameter('ibexa.design.templates.path_map') ? $container->getParameter('ibexa.design.templates.path_map') : []; diff --git a/src/bundle/DependencyInjection/Compiler/StandardThemePass.php b/src/bundle/DependencyInjection/Compiler/StandardThemePass.php index d528888..4042bdc 100644 --- a/src/bundle/DependencyInjection/Compiler/StandardThemePass.php +++ b/src/bundle/DependencyInjection/Compiler/StandardThemePass.php @@ -21,18 +21,17 @@ class StandardThemePass implements CompilerPassInterface * * Standard theme defines default core templates used for rendering, so when different design * is used, missing template still needs to be rendered using fallback. - * - * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasParameter('ibexa.design.list')) { return; } + /** @var array $designList */ $designList = $container->getParameter('ibexa.design.list'); foreach ($designList as $designName => $themes) { - if (!in_array('standard', $themes)) { + if (!in_array('standard', $themes, true)) { $designList[$designName][] = 'standard'; } } diff --git a/src/bundle/DependencyInjection/Configuration.php b/src/bundle/DependencyInjection/Configuration.php index ff68dd7..9e59c3b 100644 --- a/src/bundle/DependencyInjection/Configuration.php +++ b/src/bundle/DependencyInjection/Configuration.php @@ -13,11 +13,6 @@ class Configuration implements ConfigurationInterface { - /** - * Generate Configuration for Ibexa DXP Standard Design. - * - * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder - */ public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder(IbexaStandardDesignExtension::EXTENSION_NAME); diff --git a/src/bundle/DependencyInjection/IbexaStandardDesignExtension.php b/src/bundle/DependencyInjection/IbexaStandardDesignExtension.php index 8543121..b1fc9d2 100644 --- a/src/bundle/DependencyInjection/IbexaStandardDesignExtension.php +++ b/src/bundle/DependencyInjection/IbexaStandardDesignExtension.php @@ -16,9 +16,9 @@ class IbexaStandardDesignExtension extends Extension implements PrependExtensionInterface { - public const EXTENSION_NAME = 'ibexa_standard_design'; + public const string EXTENSION_NAME = 'ibexa_standard_design'; - public const OVERRIDE_KERNEL_TEMPLATES_PARAM_NAME = 'ibexa.design.standard.override_kernel_templates'; + public const string OVERRIDE_KERNEL_TEMPLATES_PARAM_NAME = 'ibexa.design.standard.override_kernel_templates'; public function getAlias(): string { @@ -26,14 +26,9 @@ public function getAlias(): string } /** - * Load Bundle Configuration. - * - * @param array $configs - * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container - * * @throws \Exception */ - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { $configuration = new Configuration(); @@ -48,13 +43,11 @@ public function load(array $configs, ContainerBuilder $container) /** * Allow an extension to prepend the extension configurations. * - * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container - * * @throws \Exception */ - public function prepend(ContainerBuilder $container) + public function prepend(ContainerBuilder $container): void { - $this->prependEzDesignSettings($container); + $this->prependIbexaDesignSettings($container); } /** @@ -62,9 +55,9 @@ public function prepend(ContainerBuilder $container) * * @param \Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder */ - private function prependEzDesignSettings(ContainerBuilder $containerBuilder) + private function prependIbexaDesignSettings(ContainerBuilder $containerBuilder): void { - $configFile = __DIR__ . '/../Resources/config/extension/ezdesign.yaml'; + $configFile = __DIR__ . '/../Resources/config/extension/ibexa_design_engine.yaml'; $config = Yaml::parseFile($configFile); $containerBuilder->prependExtensionConfig('ibexa_design_engine', $config); $containerBuilder->addResource(new FileResource($configFile)); diff --git a/src/bundle/IbexaStandardDesignBundle.php b/src/bundle/IbexaStandardDesignBundle.php index 3eea4e8..5932170 100644 --- a/src/bundle/IbexaStandardDesignBundle.php +++ b/src/bundle/IbexaStandardDesignBundle.php @@ -19,7 +19,7 @@ */ class IbexaStandardDesignBundle extends Bundle { - public function build(ContainerBuilder $container) + public function build(ContainerBuilder $container): void { parent::build($container); diff --git a/src/bundle/Resources/config/extension/ezdesign.yaml b/src/bundle/Resources/config/extension/ibexa_design_engine.yaml similarity index 100% rename from src/bundle/Resources/config/extension/ezdesign.yaml rename to src/bundle/Resources/config/extension/ibexa_design_engine.yaml diff --git a/src/bundle/Resources/config/override/ezpublish.yaml b/src/bundle/Resources/config/override/ibexa.yaml similarity index 100% rename from src/bundle/Resources/config/override/ezpublish.yaml rename to src/bundle/Resources/config/override/ibexa.yaml diff --git a/src/contracts/.gitkeep b/src/contracts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/lib/.gitkeep b/src/lib/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/bundle/DependencyInjection/EzPlatformStandardDesignExtensionTest.php b/tests/bundle/DependencyInjection/IbexaStandardDesignExtensionTest.php similarity index 83% rename from tests/bundle/DependencyInjection/EzPlatformStandardDesignExtensionTest.php rename to tests/bundle/DependencyInjection/IbexaStandardDesignExtensionTest.php index f3b2bbe..3a8ffa3 100644 --- a/tests/bundle/DependencyInjection/EzPlatformStandardDesignExtensionTest.php +++ b/tests/bundle/DependencyInjection/IbexaStandardDesignExtensionTest.php @@ -11,7 +11,10 @@ use Ibexa\Bundle\StandardDesign\DependencyInjection\IbexaStandardDesignExtension; use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase; -class EzPlatformStandardDesignExtensionTest extends AbstractExtensionTestCase +/** + * @covers \Ibexa\Bundle\StandardDesign\DependencyInjection\IbexaStandardDesignExtension + */ +final class IbexaStandardDesignExtensionTest extends AbstractExtensionTestCase { protected function getContainerExtensions(): array { @@ -20,7 +23,7 @@ protected function getContainerExtensions(): array ]; } - public function testExtensionPrependsStandardDesignSettings() + public function testExtensionPrependsStandardDesignSettings(): void { $this->load(); diff --git a/tests/lib/.gitkeep b/tests/lib/.gitkeep new file mode 100644 index 0000000..e69de29