Skip to content

Commit

Permalink
Fix Symfony 4.1 deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
firstred committed Nov 22, 2019
1 parent 3e924ab commit f236fad
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
if (\method_exists(TreeBuilder::class, 'getRootNode')) {
$treeBuilder = new TreeBuilder('winzou_state_machine');
$configNode = $treeBuilder->getRootNode();
} else {
$treeBuilder = new TreeBuilder();
$configNode = $treeBuilder->root('winzou_state_machine');
}

$configNode = $treeBuilder
->root('winzou_state_machine')
$configNode = $configNode
->useAttributeAsKey('name')
->prototype('array')
->children()
Expand Down

0 comments on commit f236fad

Please sign in to comment.