From c5f5f5f2131e0f876cab6fb82fd8fc44d70903a2 Mon Sep 17 00:00:00 2001 From: Steve Winter Date: Sun, 26 Apr 2020 17:14:44 +0100 Subject: [PATCH] Adding SF 5 support --- DependencyInjection/Configuration.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index a71c5f7a..a0e7703e 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -20,8 +20,13 @@ class Configuration implements ConfigurationInterface { public function getConfigTreeBuilder() { //Create tree builder - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('ambta_doctrine_encrypt'); + if (method_exists(TreeBuilder::class, 'getRootNode')) { + $treeBuilder = new TreeBuilder('ambta_doctrine_encrypt'); + $rootNode = $treeBuilder->getRootNode(); + } else { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('ambta_doctrine_encrypt'); + } // Grammar of config tree $rootNode