Skip to content

Commit d39c132

Browse files
committed
Merge pull request #194 from FriendsOfSymfony/build-matrix
adding more builds to the matrix
2 parents e2fb221 + cb7e474 commit d39c132

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

.travis.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ php:
66
- 5.5
77
- 5.6
88
- hhvm
9+
- 7
910

1011
env:
11-
- VARNISH_VERSION=3.0
12+
- VARNISH_VERSION=4.0
1213

1314
matrix:
1415
include:
1516
- php: 5.5
16-
env: VARNISH_VERSION=4.0
17+
env: VARNISH_VERSION=3.0
18+
- php: 5.3
19+
env: SYMFONY_VERSION=2.3.* VARNISH_VERSION=4.0 COMPOSER_FLAGS="--prefer-lowest"
1720

1821
branches:
1922
only:
@@ -22,21 +25,19 @@ branches:
2225
- '/^\d+\.\d+$/'
2326

2427
before_script:
28+
# Install deps
29+
- composer update $COMPOSER_FLAGS --dev --prefer-source --no-interaction
2530
# Install Varnish
2631
- curl http://repo.varnish-cache.org/debian/GPG-key.txt | sudo apt-key add -
2732
- echo "deb http://repo.varnish-cache.org/ubuntu/ precise varnish-${VARNISH_VERSION}" | sudo tee -a /etc/apt/sources.list
2833
- sudo apt-get update -qq
29-
- sudo apt-get install -qq varnish
34+
- sudo apt-get install -qq varnish python-sphinx enchant
35+
- sudo pip install -r doc/requirements.txt
3036
# Install NGINX
3137
- sh ./tests/install-nginx.sh
3238
# Starting webserver
3339
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3' ]; then ./tests/ci/install-apache.sh; fi"
3440
- sh -c "if [ '$TRAVIS_PHP_VERSION' = 'hhvm' ]; then ./tests/ci/install-apache-hhvm.sh; fi"
35-
# Install deps
36-
- composer update --dev --prefer-source
37-
# Install Sphinx and enchant
38-
- sudo apt-get install python-sphinx enchant
39-
- sudo pip install -r doc/requirements.txt
4041

4142
script:
4243
- phpunit --coverage-clover=coverage.clover

composer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@
2222
],
2323
"require": {
2424
"php": ">=5.3.3",
25-
"guzzle/guzzle": "~3.0",
25+
"guzzle/guzzle": "~3.8",
2626
"symfony/event-dispatcher": "~2.3",
2727
"symfony/options-resolver": "~2.3"
2828
},
2929
"require-dev": {
30-
"guzzle/plugin-mock": "*",
31-
"mockery/mockery": "*",
32-
"monolog/monolog": "*",
30+
"mockery/mockery": "~0.9.1",
31+
"monolog/monolog": "~1.0",
3332
"symfony/process": "~2.3",
3433
"symfony/http-kernel": "~2.3"
3534
},

src/SymfonyCache/PurgeSubscriber.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ class PurgeSubscriber extends AccessControlledSubscriber
5050
public function __construct(array $options = array())
5151
{
5252
$resolver = new OptionsResolver();
53-
$resolver->setDefined(array('purge_client_matcher', 'purge_client_ips', 'purge_method'));
53+
if (method_exists($resolver, 'setDefined')) {
54+
// this was only added in symfony 2.6
55+
$resolver->setDefined(array('purge_client_matcher', 'purge_client_ips', 'purge_method'));
56+
} else {
57+
$resolver->setOptional(array('purge_client_matcher', 'purge_client_ips', 'purge_method'));
58+
}
5459
$resolver->setDefaults(array(
5560
'purge_client_matcher' => null,
5661
'purge_client_ips' => null,

0 commit comments

Comments
 (0)