Skip to content

Commit bcda741

Browse files
committed
Be compatible with symfony/configuration ^3.4 as well as ^4.0
1 parent 07fbd1c commit bcda741

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

DependencyInjection/Configuration.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ class Configuration implements ConfigurationInterface
1010
public function getConfigTreeBuilder()
1111
{
1212
$treeBuilder = new TreeBuilder('webfactory_shortcode');
13+
$rootNode = method_exists(TreeBuilder::class, 'getRootNode') ? $treeBuilder->getRootNode() : $treeBuilder->root('webfactory_shortcode');
1314

1415
// For details on these configuration options, see https://github.com/thunderer/Shortcode#parsing and
1516
// https://github.com/thunderer/Shortcode#configuration .
16-
$treeBuilder->getRootNode()
17+
$rootNode
1718
->children()
1819
->enumNode('parser')
1920
->info('Which parser type to use, choose "regular" or "regex".')

0 commit comments

Comments
 (0)