Skip to content

Commit

Permalink
Merge pull request #239 from FriendsOfSymfony/symfony-2.8
Browse files Browse the repository at this point in the history
Test against Symfony 2.8
  • Loading branch information
dbu committed Sep 30, 2015
2 parents aa20b2a + 34cb52b commit a28853a
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 24 deletions.
19 changes: 12 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

Expand All @@ -18,23 +19,27 @@ matrix:
env:
- PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
- COVERAGE=true
- php: 5.5
- php: 5.6
env: SYMFONY_VERSION='2.3.*'
- php: 5.5
- php: 5.6
env:
- SYMFONY_VERSION='2.4.*'
- FRAMEWORK_EXTRA_VERSION='~3.0'
- php: 5.5
- php: 5.6
env:
- SYMFONY_VERSION='2.5.*'
- FRAMEWORK_EXTRA_VERSION='~3.0'
- php: 5.5
- php: 5.6
env:
- SYMFONY_VERSION='2.6.*'
- FRAMEWORK_EXTRA_VERSION='~3.0'
- php: 5.5
- php: 5.6
env:
- SYMFONY_VERSION='2.7.*'
- FRAMEWORK_EXTRA_VERSION='~3.0'
- php: 5.6
env:
- SYMFONY_VERSION='2.7.*@dev'
- SYMFONY_VERSION='2.8.*@dev'
- FRAMEWORK_EXTRA_VERSION='~3.0'

before_script:
Expand All @@ -45,7 +50,7 @@ before_script:
- sudo pip install -r Resources/doc/requirements.txt

script:
- phpunit ${PHPUNIT_FLAGS}
- SYMFONY_DEPRECATIONS_HELPER=weak phpunit ${PHPUNIT_FLAGS}
- make -C Resources/doc SPHINXOPTS='-nW' html
- make -C Resources/doc spelling

Expand Down
6 changes: 2 additions & 4 deletions DependencyInjection/FOSHttpCacheExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,11 @@ private function loadTest(ContainerBuilder $container, XmlFileLoader $loader, ar
$loader->load('test_client.xml');

if ($config['client']['varnish']['enabled']) {
$container->getDefinition($this->getAlias().'.test.client.varnish')
->setAbstract(false);
$loader->load('varnish_test_client.xml');
}

if ($config['client']['nginx']['enabled']) {
$container->getDefinition($this->getAlias().'.test.client.nginx')
->setAbstract(false);
$loader->load('nginx_test_client.xml');
}

$container->setAlias(
Expand Down
6 changes: 0 additions & 6 deletions Resources/config/nginx.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
<argument>%fos_http_cache.proxy_client.nginx.purge_location%</argument>
<argument type="service" id="fos_http_cache.proxy_client.nginx.guzzle_client" on-invalid="ignore"/>
</service>

<service id="fos_http_cache.test.client.nginx"
parent="fos_http_cache.test.client.abstract"
abstract="true">
<argument index="0">%fos_http_cache.proxy_client.nginx.base_url%</argument>
</service>
</services>

</container>
14 changes: 14 additions & 0 deletions Resources/config/nginx_test_client.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="fos_http_cache.test.client.nginx"
parent="fos_http_cache.test.client.abstract">
<argument index="0">%fos_http_cache.proxy_client.nginx.base_url%</argument>
</service>
</services>

</container>
6 changes: 0 additions & 6 deletions Resources/config/varnish.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
<argument type="service" id="fos_http_cache.proxy_client.varnish.guzzle_client" on-invalid="ignore"/>
</service>

<service id="fos_http_cache.test.client.varnish"
parent="fos_http_cache.test.client.abstract"
abstract="true">
<argument index="0">%fos_http_cache.proxy_client.varnish.base_url%</argument>
</service>

</services>

</container>
14 changes: 14 additions & 0 deletions Resources/config/varnish_test_client.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="fos_http_cache.test.client.varnish"
parent="fos_http_cache.test.client.abstract">
<argument index="0">%fos_http_cache.proxy_client.varnish.base_url%</argument>
</service>
</services>

</container>
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function testConfigNoContext()
$config = $this->getBaseConfig();
$this->extension->load(array($config), $container);
$this->userContextListenerPass->process($container);
$this->assertCount(14, $container->getDefinitions());
$this->assertCount(13, $container->getDefinitions());
}

/**
Expand Down

0 comments on commit a28853a

Please sign in to comment.