Skip to content

Commit 22e75ba

Browse files
authored
Symfony 4.2 compatibility. (#56)
* Symfony 4.2 compatibility. * minor * use phpunit 6.5
1 parent d080761 commit 22e75ba

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cache:
99
env:
1010
global:
1111
- TEST_COMMAND="composer test"
12-
- SYMFONY_PHPUNIT_VERSION="6.3"
12+
- SYMFONY_PHPUNIT_VERSION="6.5"
1313

1414
branches:
1515
except:
@@ -39,7 +39,7 @@ matrix:
3939
env: DEPENDENCIES="dunglas/symfony-lock:^4"
4040

4141
# Latest commit to master
42-
- php: 7.2
42+
- php: 7.3
4343
env: STABILITY="dev"
4444

4545
allow_failures:

DependencyInjection/Configuration.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@ public function __construct($debug)
3939
*/
4040
public function getConfigTreeBuilder()
4141
{
42-
$treeBuilder = new TreeBuilder();
43-
$root = $treeBuilder->root('neo4j');
42+
$treeBuilder = new TreeBuilder('neo4j');
43+
// Keep compatibility with symfony/config < 4.2
44+
if (!method_exists($treeBuilder, 'getRootNode')) {
45+
$root = $treeBuilder->root('neo4j');
46+
} else {
47+
$root = $treeBuilder->getRootNode();
48+
}
4449

4550
$root->children()
4651
->arrayNode('profiling')

0 commit comments

Comments
 (0)