diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 202150e..6240c2b 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -17,8 +17,14 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('m6web_cassandra'); + $treeBuilder = new TreeBuilder('m6web_cassandra'); + + if (method_exists($treeBuilder, 'getRootNode')) { + $rootNode = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $rootNode = $treeBuilder->root('m6web_cassandra'); + } $rootNode ->children() diff --git a/src/Resources/views/Collector/cassandra.html.twig b/src/Resources/views/Collector/cassandra.html.twig index fd915d3..cf99265 100644 --- a/src/Resources/views/Collector/cassandra.html.twig +++ b/src/Resources/views/Collector/cassandra.html.twig @@ -16,9 +16,7 @@ {% block menu %} - {% spaceless %} - Cassandra - {% endspaceless %} + Cassandra Cassandra {{ collector.commands|length }}