Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A tree builder without a root node in Symfony 4.2

I upgraded my Symfony project from 4.1 to 4.2 and get this notice 12 times in profiler:

A tree builder without a root node is deprecated since Symfony 4.2 and will not be supported anymore in 5.0.

and the trace of the log is:

{▼
  /home/user/foo/bar/project/vendor/symfony/config/Definition/Builder/TreeBuilder.php:30 {▼
    › if (null === $name) {
    ›     @trigger_error('A tree builder without a root node is deprecated since Symfony 4.2 and will not be supported anymore in 5.0.', E_USER_DEPRECATED);
    › } else {
  }
  /home/user/foo/bar/project/vendor/sensio/framework-extra-bundle/DependencyInjection/Configuration.php:32 {▼
    › {
    ›     $treeBuilder = new TreeBuilder();
    ›     $rootNode = $treeBuilder->root('sensio_framework_extra', 'array');
  }
}

how to fix this?

like image 495
A.Seddighi Avatar asked Dec 07 '18 07:12

A.Seddighi


1 Answers

The issue is already be fixed in the sensio/framework-extra-bundle: https://github.com/sensiolabs/SensioFrameworkExtraBundle/issues/593

You have to wait for the next update (higher 5.2.2).

like image 133
David R Avatar answered Nov 15 '22 09:11

David R