diff --git a/composer.json b/composer.json index db3d15a6..5821d554 100644 --- a/composer.json +++ b/composer.json @@ -33,6 +33,7 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.3", "ergebnis/composer-normalize": "^2.0.1", + "knplabs/knp-menu-bundle": "^2.3 || ^3.0", "symfony/browser-kit": "^4.4 || ^5.0", "symfony/translation": "^4.2 || ^5.0" }, diff --git a/src/DependencyInjection/NucleosMenuExtension.php b/src/DependencyInjection/NucleosMenuExtension.php index eba3fb16..ee419929 100644 --- a/src/DependencyInjection/NucleosMenuExtension.php +++ b/src/DependencyInjection/NucleosMenuExtension.php @@ -23,7 +23,7 @@ final class NucleosMenuExtension extends Extension */ public function load(array $configs, ContainerBuilder $container): void { - $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader = new Loader\PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.php'); $configuration = new Configuration(); diff --git a/tests/App/AppKernel.php b/tests/App/AppKernel.php index 165bab90..3ca066fa 100644 --- a/tests/App/AppKernel.php +++ b/tests/App/AppKernel.php @@ -11,6 +11,7 @@ namespace Nucleos\MenuBundle\Tests\App; +use Knp\Bundle\MenuBundle\KnpMenuBundle; use Nucleos\MenuBundle\NucleosMenuBundle; use Nucleos\MenuBundle\Tests\App\Controller\TwigTestController; use Sonata\BlockBundle\SonataBlockBundle; @@ -36,6 +37,7 @@ public function registerBundles() yield new FrameworkBundle(); yield new TwigBundle(); yield new SonataBlockBundle(); + yield new KnpMenuBundle(); yield new NucleosMenuBundle(); }