From 6e4d266412577ef490d77c8c1c7c64e52bdfd13c Mon Sep 17 00:00:00 2001 From: OxCom Date: Sun, 2 Dec 2018 11:34:47 +0100 Subject: [PATCH 1/2] fix deprecation notice --- DependencyInjection/Configuration.php | 10 ++++++++-- composer.json | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index b42b1b4..240a02c 100755 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -61,8 +61,14 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root(SymfonyRollbarExtension::ALIAS); + if (method_exists(TreeBuilder::class, 'getRootNode')) { + $treeBuilder = new TreeBuilder(SymfonyRollbarExtension::ALIAS); + $rootNode = $treeBuilder->getRootNode(); + } else { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root(SymfonyRollbarExtension::ALIAS); + } + $defaultErrorMask = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR; $rootNode diff --git a/composer.json b/composer.json index ad0782c..c23d6c5 100755 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "require": { "php": ">=5.6", "monolog/monolog": "^1.23", - "rollbar/rollbar": "^1.3", + "rollbar/rollbar": "^1.6", "symfony/dependency-injection": "^2.8|~3.0|~4.0", "symfony/config": "^2.8|~3.0|~4.0", "symfony/http-kernel": "^2.8|~3.0|~4.0", From 93b229296dfb7187775ec06ac358756d0c0ac7c8 Mon Sep 17 00:00:00 2001 From: OxCom Date: Sun, 2 Dec 2018 11:52:02 +0100 Subject: [PATCH 2/2] #16: reduce dependencies --- Provider/AbstractPersonProvider.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) mode change 100644 => 100755 Provider/AbstractPersonProvider.php diff --git a/Provider/AbstractPersonProvider.php b/Provider/AbstractPersonProvider.php old mode 100644 new mode 100755 index c6a03f5..d19bd97 --- a/Provider/AbstractPersonProvider.php +++ b/Provider/AbstractPersonProvider.php @@ -5,6 +5,11 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use SymfonyRollbarBundle\Provider\PersonInterface; +/** + * Class AbstractPersonProvider + * + * @package SymfonyRollbarBundle\Provider + */ abstract class AbstractPersonProvider { /** @@ -12,13 +17,6 @@ abstract class AbstractPersonProvider */ protected $person; - /** - * Initialize current person that should be tracked with Rollbar - * - * @param \Symfony\Component\DependencyInjection\ContainerInterface $container - */ - abstract public function __construct(ContainerInterface $container); - /** * @return array|null */