You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I upgraded to Symfony 4.0, I was met with an error:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\UndefinedMethodException: Attempted to call an undefined method named "getRootNode" of class "Symfony\Component\Config\Definition\Builder\TreeBuilder". in /var/www/html/vendor/bentools/webpush-bundle/src/DependencyInjection/Configuration.php:18
I found out that in BenTools\WebPushBundle\DependencyInjection::getConfigTreeBuilder()
if (Kernel::MAJOR_VERSION < 4) {
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('bentools_webpush');
} else {
$treeBuilder = new TreeBuilder('bentools_webpush');
$rootNode = $treeBuilder->getRootNode();
}
I noticed that other packages that are not failing are basically checking if method exists before calling it (i.e doctrine):
$treeBuilder = new TreeBuilder('doctrine');
if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('doctrine');
}
Notice the comment, seems thatgetRootNode method does not exist in <4.2. Could we add a support for it?
The text was updated successfully, but these errors were encountered:
When I upgraded to Symfony 4.0, I was met with an error:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\UndefinedMethodException: Attempted to call an undefined method named "getRootNode" of class "Symfony\Component\Config\Definition\Builder\TreeBuilder". in /var/www/html/vendor/bentools/webpush-bundle/src/DependencyInjection/Configuration.php:18
I found out that in
BenTools\WebPushBundle\DependencyInjection::getConfigTreeBuilder()
I noticed that other packages that are not failing are basically checking if method exists before calling it (i.e doctrine):
Notice the comment, seems that
getRootNode
method does not exist in <4.2. Could we add a support for it?The text was updated successfully, but these errors were encountered: