Skip to content

Commit

Permalink
Merge 8a57f30 into db0ed59
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed Dec 14, 2018
2 parents db0ed59 + 8a57f30 commit 7398c22
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Expand Up @@ -18,7 +18,6 @@ env:
- PHPUNIT_FLAGS="-v"
- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
- SYMFONY_PHPUNIT_VERSION=6.5
- SYMFONY_DEPRECATIONS_HELPER=10

branches:
only:
Expand All @@ -31,10 +30,10 @@ matrix:

- php: 7.1
env:
- COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak"
- COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
- php: 7.2
env:
- COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak"
- COMPOSER_FLAGS="--prefer-stable --prefer-lowest"

# Test the latest stable release

Expand Down
5 changes: 3 additions & 2 deletions phpunit.xml.dist
Expand Up @@ -29,7 +29,8 @@
</listeners>

<php>
<server name="KERNEL_DIR" value="./tests/Functional/Fixtures/app" />
<server name="KERNEL_CLASS" value="AppKernel" />
<env name="KERNEL_DIR" value="./tests/Functional/Fixtures/app" />
<env name="KERNEL_CLASS" value="AppKernel" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
</php>
</phpunit>
22 changes: 12 additions & 10 deletions src/DependencyInjection/Configuration.php
Expand Up @@ -53,12 +53,13 @@ public function __construct($debug)
*/
public function getConfigTreeBuilder()
{
if (method_exists(TreeBuilder::class, 'getRootNode')) {
$treeBuilder = new TreeBuilder('fos_http_cache');
$rootNode = $treeBuilder->getRootNode();
$treeBuilder = new TreeBuilder('fos_http_cache');

// Keep compatibility with symfony/config < 4.2
if (!method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->root('httplug');
} else {
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('fos_http_cache');
$rootNode = $treeBuilder->getRootNode();
}

$rootNode
Expand Down Expand Up @@ -517,12 +518,13 @@ private function addProxyClientSection(ArrayNodeDefinition $rootNode)
*/
private function getHttpDispatcherNode()
{
if (method_exists(TreeBuilder::class, 'getRootNode')) {
$treeBuilder = new TreeBuilder('http');
$node = $treeBuilder->getRootNode();
$treeBuilder = new TreeBuilder('http');

// Keep compatibility with symfony/config < 4.2
if (!method_exists($treeBuilder, 'getRootNode')) {
$node = $treeBuilder->root('httplug');
} else {
$treeBuilder = new TreeBuilder();
$node = $treeBuilder->root('http');
$node = $treeBuilder->getRootNode();
}

$node
Expand Down

0 comments on commit 7398c22

Please sign in to comment.