Skip to content

Commit

Permalink
Merge pull request #20 from OxCom/develop
Browse files Browse the repository at this point in the history
fix deprecation notice
  • Loading branch information
OxCom authored Dec 2, 2018
2 parents 6c55d7d + 93b2292 commit 4f66ccb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
10 changes: 8 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 5 additions & 7 deletions Provider/AbstractPersonProvider.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@
use Symfony\Component\DependencyInjection\ContainerInterface;
use SymfonyRollbarBundle\Provider\PersonInterface;

/**
* Class AbstractPersonProvider
*
* @package SymfonyRollbarBundle\Provider
*/
abstract class AbstractPersonProvider
{
/**
* @var \SymfonyRollbarBundle\Provider\PersonInterface
*/
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
*/
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4f66ccb

Please sign in to comment.