Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into index-templates-s…
Browse files Browse the repository at this point in the history
…upport
  • Loading branch information
dbalabka committed Jan 2, 2019
2 parents 7706aa3 + 35bf32e commit e227eb3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ matrix:
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
- php: 7.2
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
- php: 7.3
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"

# Latest supported dependencies with each PHP version
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-clover=coverage.clover"
- php: 7.3
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-clover=coverage.clover"

# Install all SF components in the same major version, see https://github.com/dunglas/symfony-lock
- php: 7.2
Expand Down
10 changes: 8 additions & 2 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ public function __construct($debug)
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('fos_elastica', 'array');
$treeBuilder = new TreeBuilder('fos_elastica');

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

$this->addClientsSection($rootNode);
$this->addIndexesSection($rootNode);
Expand Down

0 comments on commit e227eb3

Please sign in to comment.