Skip to content

Commit 97fd5f2

Browse files
committed
Drop PHP 5.4 support
Fix Symfony 2.3-incompatible calls
1 parent 348b3c9 commit 97fd5f2

File tree

6 files changed

+14
-22
lines changed

6 files changed

+14
-22
lines changed

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: php
22

33
php:
4-
- 5.4
54
- 5.5
65
- 5.6
76
- hhvm
@@ -12,7 +11,7 @@ env:
1211

1312
matrix:
1413
include:
15-
- php: 5.4
14+
- php: 5.5
1615
env: SYMFONY_VERSION=2.3.* VARNISH_VERSION=3.0 COMPOSER_FLAGS="--prefer-lowest"
1716

1817
branches:
@@ -22,8 +21,6 @@ branches:
2221
- '/^\d+\.\d+$/'
2322

2423
install:
25-
- if [[ "$TRAVIS_PHP_VERSION" == "5.4" || "$TRAVIS_PHP_VERSION" == "hhvm" ]]; then composer remove "php-http/guzzle6-adapter" --dev --no-update; fi
26-
- if [[ "$TRAVIS_PHP_VERSION" == "5.4" || "$TRAVIS_PHP_VERSION" == "hhvm" ]]; then composer require "php-http/guzzle5-adapter" --dev --no-update; fi
2724
- composer update $COMPOSER_FLAGS --prefer-source --no-interaction
2825

2926
before_script:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"minimum-stability": "dev",
2424
"prefer-stable": true,
2525
"require": {
26-
"php": ">=5.4.8",
26+
"php": ">=5.5.9",
2727
"symfony/event-dispatcher": "^2.3||^3.0",
2828
"symfony/options-resolver": "^2.3||^3.0",
2929
"php-http/client-implementation": "^1.0.0",

doc/contributing.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ The library also includes functional tests against a Varnish and NGINX instance.
3636
The functional test suite by default uses PHP’s built-in web server. If you have
3737
PHP 5.4 or newer, simply run with the default configuration.
3838

39-
If you want to run the tests on PHP 5.3, you need to configure a web server
39+
If you want to run the tests on HHVM_, you need to configure a web server
4040
listening on localhost:8080 that points to the folder
41-
``tests/Functional/Fixtures/web``.
42-
43-
If you want to run the tests on HHVM_, you need to configure a web server and
44-
start a `HHVM FastCGI server`_.
41+
``tests/Functional/Fixtures/web`` and start a `HHVM FastCGI server`_.
4542

4643
To run the functional tests:
4744

doc/installation.rst

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,20 @@ Installation
55
------------
66

77
The FOSHttpCache library is available on Packagist_. You can install it using
8-
Composer_:
8+
Composer_.
99

10-
.. code-block:: bash
10+
The library relies on HTTPlug_ for sending invalidation requests over HTTP, so
11+
you need to install an HTTPlug-compatible client or adapter first:
1112

12-
$ composer require friendsofsymfony/http-cache
13+
.. code-block:: bash
1314
14-
Note that the library needs a ``psr/http-message-implementation`` and
15-
``php-http/adapter-implementation``. If your project does not contain one,
16-
composer will complain that it did not find ``psr/http-message-implementation``.
15+
$ composer require php-http/guzzle6-adapter
1716
18-
When on PHP 5.5+, use the following line instead:
17+
Then install the FOSHttpCache library itself:
1918

2019
.. code-block:: bash
2120
22-
$ composer require friendsofsymfony/http-cache guzzlehttp/psr7:^1.0 php-http/guzzle6-adapter:^0.1.0
23-
24-
On PHP 5.4, the ``php-http/guzzle5-adapter:^0.1.0`` works fine.
21+
$ composer require friendsofsymfony/http-cache
2522
2623
.. note::
2724

@@ -61,3 +58,4 @@ invalidation requests:
6158
.. _Packagist: https://packagist.org/packages/friendsofsymfony/http-cache
6259
.. _Composer: http://getcomposer.org
6360
.. _Semantic Versioning: http://semver.org/
61+
.. _HTTPlug: http://httplug.io

src/ProxyClient/AbstractProxyClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function flush()
9393
protected function getDefaultOptions()
9494
{
9595
$resolver = new OptionsResolver();
96-
$resolver->setDefault('base_uri', null);
96+
$resolver->setDefaults(['base_uri' => null]);
9797

9898
return $resolver;
9999
}

src/ProxyClient/Varnish.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function refresh($url, array $headers = [])
196196
protected function getDefaultOptions()
197197
{
198198
$resolver = parent::getDefaultOptions();
199-
$resolver->setDefault('tags_header', 'X-Cache-Tags');
199+
$resolver->setDefaults(['tags_header' => 'X-Cache-Tags']);
200200

201201
return $resolver;
202202
}

0 commit comments

Comments
 (0)