Skip to content

Commit

Permalink
adding more builds to the matrix and adjust to correct lowest require…
Browse files Browse the repository at this point in the history
…ments
  • Loading branch information
dbu committed May 10, 2015
1 parent 6269866 commit cb7e474
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ php:
- 5.5
- 5.6
- hhvm
- 7

env:
- VARNISH_VERSION=3.0
- VARNISH_VERSION=4.0

matrix:
include:
- php: 5.5
env: VARNISH_VERSION=4.0
env: VARNISH_VERSION=3.0
- php: 5.3
env: SYMFONY_VERSION=2.3.* VARNISH_VERSION=4.0 COMPOSER_FLAGS="--prefer-lowest"

branches:
only:
Expand All @@ -22,21 +25,19 @@ branches:
- '/^\d+\.\d+$/'

before_script:
# Install deps
- composer update $COMPOSER_FLAGS --dev --prefer-source --no-interaction
# Install Varnish
- curl http://repo.varnish-cache.org/debian/GPG-key.txt | sudo apt-key add -
- echo "deb http://repo.varnish-cache.org/ubuntu/ precise varnish-${VARNISH_VERSION}" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update -qq
- sudo apt-get install -qq varnish
- sudo apt-get install -qq varnish python-sphinx enchant
- sudo pip install -r doc/requirements.txt
# Install NGINX
- sh ./tests/install-nginx.sh
# Starting webserver
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3' ]; then ./tests/ci/install-apache.sh; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = 'hhvm' ]; then ./tests/ci/install-apache-hhvm.sh; fi"
# Install deps
- composer update --dev --prefer-source
# Install Sphinx and enchant
- sudo apt-get install python-sphinx enchant
- sudo pip install -r doc/requirements.txt

script:
- phpunit --coverage-clover=coverage.clover
Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@
],
"require": {
"php": ">=5.3.3",
"guzzle/guzzle": "~3.0",
"guzzle/guzzle": "~3.8",
"symfony/event-dispatcher": "~2.3",
"symfony/options-resolver": "~2.3"
},
"require-dev": {
"guzzle/plugin-mock": "*",
"mockery/mockery": "*",
"monolog/monolog": "*",
"mockery/mockery": "~0.9.1",
"monolog/monolog": "~1.0",
"symfony/process": "~2.3",
"symfony/http-kernel": "~2.3"
},
Expand Down
7 changes: 6 additions & 1 deletion src/SymfonyCache/PurgeSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ class PurgeSubscriber extends AccessControlledSubscriber
public function __construct(array $options = array())
{
$resolver = new OptionsResolver();
$resolver->setDefined(array('purge_client_matcher', 'purge_client_ips', 'purge_method'));
if (method_exists($resolver, 'setDefined')) {
// this was only added in symfony 2.6
$resolver->setDefined(array('purge_client_matcher', 'purge_client_ips', 'purge_method'));
} else {
$resolver->setOptional(array('purge_client_matcher', 'purge_client_ips', 'purge_method'));
}
$resolver->setDefaults(array(
'purge_client_matcher' => null,
'purge_client_ips' => null,
Expand Down

0 comments on commit cb7e474

Please sign in to comment.