diff --git a/Config/Definition/Builder/MenuNodeDefinition.php b/Config/Definition/Builder/MenuNodeDefinition.php index 7949962..2659fda 100644 --- a/Config/Definition/Builder/MenuNodeDefinition.php +++ b/Config/Definition/Builder/MenuNodeDefinition.php @@ -64,7 +64,7 @@ public function menuNodeHierarchy(int $depth = 10): NodeParentInterface ->end() ->end() ->arrayNode('extras') - ->prototype('scalar') + ->prototype('variable') ->end() ->end() ->menuNode('children')->menuNodeHierarchy($depth - 1) diff --git a/Tests/DependencyInjection/Fixtures/Bundle2/Resources/config/navigation.yml b/Tests/DependencyInjection/Fixtures/Bundle2/Resources/config/navigation.yml index 2a6a68d..5ba1850 100644 --- a/Tests/DependencyInjection/Fixtures/Bundle2/Resources/config/navigation.yml +++ b/Tests/DependencyInjection/Fixtures/Bundle2/Resources/config/navigation.yml @@ -27,6 +27,9 @@ main: extras: key1: value1 key2: value2 + routes: + - pattern: /^foo/ + - pattern: /^bar/ four_item: label: "Four Item Label" order: 40 diff --git a/Tests/Provider/ConfigurationMenuProviderTest.php b/Tests/Provider/ConfigurationMenuProviderTest.php index 4601f36..54c22d0 100644 --- a/Tests/Provider/ConfigurationMenuProviderTest.php +++ b/Tests/Provider/ConfigurationMenuProviderTest.php @@ -121,6 +121,8 @@ public function testGet(): void 'key1' => 'value1', 'key2' => 'value2', 'routes' => array( + array('pattern' => '/^foo/'), + array('pattern' => '/^bar/'), array('route' => 'my_route', 'parameters' => array('test' => 'test1')) ) ),