Skip to content

Commit

Permalink
Merge pull request #2882 from phamuyentri/update-deprecated-tree-buil…
Browse files Browse the repository at this point in the history
…der-from-Symfony4.2

Update deprecated from Symfony 4.2
  • Loading branch information
XWB authored Dec 10, 2018
2 parents f07aa7b + c10ef59 commit f4732e9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('fos_user');
$treeBuilder = new TreeBuilder('fos_user');

if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
$rootNode = $treeBuilder->root('fos_user');
}

$supportedDrivers = array('orm', 'mongodb', 'couchdb', 'custom');

Expand Down

0 comments on commit f4732e9

Please sign in to comment.