diff --git a/.travis.yml b/.travis.yml index d202314..f898488 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 + - nightly env: matrix: @@ -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: @@ -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 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6010f11..e759330 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -19,6 +19,9 @@ tests/Integration + + + src/ diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index f2fe99d..ad1ad3d 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -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()