Skip to content

Deprecated constructing a TreeBuilder without passing root node information #307

@heximcz

Description

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

The "Symfony\Component\Config\Definition\Builder\TreeBuilder::root()" method called for the "translation" configuration is deprecated since Symfony 4.3, pass the root name to the constructor instead.
Hide context    Hide trace
[▼
  "exception" => SilencedErrorContext^ {#1420 ▶}
]
{▼
  .../vendor/symfony/config/Definition/Builder/TreeBuilder.php:52 {▶}
 .../vendor/php-translation/symfony-bundle/DependencyInjection/Configuration.php:37 {▼
    › $treeBuilder = new TreeBuilder();
    › $root = $treeBuilder->root('translation');
    › 
  }
}

Solution is here:
https://github.com/symfony/symfony/blob/master/UPGRADE-4.2.md#config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions