schmittjoh / JMSI18nRoutingBundle

Allows you to internationalize your routing
http://jmsyst.com/bundles/JMSI18nRoutingBundle
358 stars 159 forks source link

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

Closed Shoplifter closed 1 year ago

Shoplifter commented 5 years ago

image

$tb = new TreeBuilder();
$tb
    ->root('jms_i18n_routing')
        ....
    ->end()

might be replaced with

$tb = new TreeBuilder('jms_i18n_routing');
if (method_exists($tb, 'getRootNode')) {
    $rootNode = $tb->getRootNode();
} else {
    // BC layer for symfony/config 4.1 and older
    $rootNode = $tb->root('jms_i18n_routing');
}
$rootNode
    //->root('jms_i18n_routing') /* remove */
        ....
    //->end() /* remove */
florianajir commented 5 years ago

+1