diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php
index <HASH>..<HASH> 100644
--- a/src/DependencyInjection/Configuration.php
+++ b/src/DependencyInjection/Configuration.php
@@ -41,8 +41,13 @@ class Configuration implements ConfigurationInterface
      */
     public function getConfigTreeBuilder(): TreeBuilder
     {
-        $treeBuilder = new TreeBuilder('contentful', 'array', $this->builder);
-        $root = $treeBuilder->getRootNode();
+        if (\method_exists(TreeBuilder::class, 'getRootNode')) {
+            $treeBuilder = new TreeBuilder('contentful', 'array', $this->builder);
+            $root = $treeBuilder->getRootNode();
+        } else {
+            $treeBuilder = new TreeBuilder();
+            $root = $treeBuilder->root('contentful', 'array', $this->builder);
+        }
 
         $root
             ->addDefaultsIfNotSet()
Use method_exists to provide compatibility with very old versions of Symfony.