Skip to content

Commit 6e4d266

Browse files
committed
fix deprecation notice
1 parent 48e8f36 commit 6e4d266

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

DependencyInjection/Configuration.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,14 @@ class Configuration implements ConfigurationInterface
6161
*/
6262
public function getConfigTreeBuilder()
6363
{
64-
$treeBuilder = new TreeBuilder();
65-
$rootNode = $treeBuilder->root(SymfonyRollbarExtension::ALIAS);
64+
if (method_exists(TreeBuilder::class, 'getRootNode')) {
65+
$treeBuilder = new TreeBuilder(SymfonyRollbarExtension::ALIAS);
66+
$rootNode = $treeBuilder->getRootNode();
67+
} else {
68+
$treeBuilder = new TreeBuilder();
69+
$rootNode = $treeBuilder->root(SymfonyRollbarExtension::ALIAS);
70+
}
71+
6672
$defaultErrorMask = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR;
6773

6874
$rootNode

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"require": {
3131
"php": ">=5.6",
3232
"monolog/monolog": "^1.23",
33-
"rollbar/rollbar": "^1.3",
33+
"rollbar/rollbar": "^1.6",
3434
"symfony/dependency-injection": "^2.8|~3.0|~4.0",
3535
"symfony/config": "^2.8|~3.0|~4.0",
3636
"symfony/http-kernel": "^2.8|~3.0|~4.0",

0 commit comments

Comments
 (0)