From 79cc44e8f1f48498b09e3426a8deb22603060ef6 Mon Sep 17 00:00:00 2001 From: Melanie Kuhles Date: Tue, 26 Nov 2019 10:33:29 +0100 Subject: [PATCH 1/3] Fix Deprecated treeBuilder rootNode --- DependencyInjection/Configuration.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 76a18f3..5493f92 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -16,7 +16,12 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('limenius_react'); + if (method_exists($treeBuilder, 'getRootNode')) { + $rootNode = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $rootNode = $treeBuilder->root('limenius_react'); + } $rootNode ->children() ->enumNode('default_rendering') From b8dace2873eb90db728b26b6d0b2ee8e273cbed2 Mon Sep 17 00:00:00 2001 From: mkuhles Date: Thu, 28 Nov 2019 12:54:31 +0100 Subject: [PATCH 2/3] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ae7cdd5..88264a3 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "limenius/react-bundle", + "name": "mkuhles/react-bundle", "description": "Client and Server-side react rendering in a Symfony Bundle", "type": "symfony-bundle", "keywords": ["react", "isomorphic"], From 753b266291e294123863bd456ddf6bccb927cc13 Mon Sep 17 00:00:00 2001 From: Melanie Kuhles Date: Thu, 28 Nov 2019 13:09:00 +0100 Subject: [PATCH 3/3] add route node name in TreeBuilder constructor --- DependencyInjection/Configuration.php | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 5493f92..338e31d 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -15,7 +15,7 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); + $treeBuilder = new TreeBuilder('limenius_react'); if (method_exists($treeBuilder, 'getRootNode')) { $rootNode = $treeBuilder->getRootNode(); } else { diff --git a/composer.json b/composer.json index 88264a3..ae7cdd5 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "mkuhles/react-bundle", + "name": "limenius/react-bundle", "description": "Client and Server-side react rendering in a Symfony Bundle", "type": "symfony-bundle", "keywords": ["react", "isomorphic"],