Skip to content

Commit

Permalink
Merge pull request #109 from PabloKowalczyk/remove-symfony-deprecations
Browse files Browse the repository at this point in the history
Test against PHP 7.3+ and Symfony 4.0+
  • Loading branch information
rosstuck committed Dec 16, 2018
2 parents 5777f90 + 002482c commit e006130
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Expand Up @@ -10,6 +10,8 @@ php:
- 7.0
- 7.1
- 7.2
- 7.3
- nightly

env:
matrix:
Expand All @@ -19,6 +21,8 @@ env:
- SYMFONY_VERSION="3.3.*"
- SYMFONY_VERSION="3.4.*"
- SYMFONY_VERSION="4.0.*"
- SYMFONY_VERSION="4.1.*"
- SYMFONY_VERSION="4.2.*"

matrix:
include:
Expand All @@ -29,7 +33,10 @@ matrix:
exclude:
- php: 7.0
env: SYMFONY_VERSION="4.0.*"

- php: 7.0
env: SYMFONY_VERSION="4.1.*"
- php: 7.0
env: SYMFONY_VERSION="4.2.*"

before_install:
- composer self-update || true
Expand Down
3 changes: 3 additions & 0 deletions phpunit.xml.dist
Expand Up @@ -19,6 +19,9 @@
<directory>tests/Integration</directory>
</testsuite>
</testsuites>
<php>
<server name="SHELL_VERBOSITY" value="-1"/>
</php>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
Expand Down
10 changes: 8 additions & 2 deletions src/DependencyInjection/Configuration.php
Expand Up @@ -21,8 +21,14 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('tactician');
$treeBuilder = new TreeBuilder('tactician');

if (\method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('tactician');
}

$rootNode
->children()
Expand Down

0 comments on commit e006130

Please sign in to comment.