Skip to content

Support Symfony 5.x #123

@thelem

Description

@thelem

After upgrading Symfony I see this warning in the console:

The "Symfony\Component\Config\Definition\Builder\TreeBuilder::root()" method called for the "comur_image" configuration is deprecated since Symfony 4.3, pass the root name to the constructor instead.

This is due to the change at symfony/symfony#27476

We need to maintain compatibility with Symfony 3 and 4.2, so suggested fix is:

$treeBuilder = new TreeBuilder("my_node");
$rootNode = method_exists($treeBuilder, "getRootNode")
? $treeBuilder->getRootNode()
: $treeBuilder->root("my_node"); // BC layer for symfony/config 4.2 and older

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions