Skip to content

fix regression in unit tests #550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:

varnish5:
name: PHP ${{ matrix.php }} Legacy Varnish 5
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
env:
VARNISH_VERSION: '5.1'
VARNISH_MODULES_VERSION: '0.14.0'
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:

varnish4:
name: PHP ${{ matrix.php }} Legacy Varnish 4
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
env:
VARNISH_VERSION: '4.1'
VARNISH_MODULES_VERSION: '' # varnish modules compilation fails, not sure why
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/setup-varnish-legacy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e
echo "### Installing Legacy Varnish $VARNISH_VERSION ###"
curl -A "FOS Github" -o /tmp/libjemalloc1_3.6.0-11_amd64.deb -D - -L -s http://ftp.osuosl.org/pub/ubuntu/pool/universe/j/jemalloc/libjemalloc1_3.6.0-11_amd64.deb
sudo dpkg -i /tmp/libjemalloc1_3.6.0-11_amd64.deb
sudo apt-get update
sudo apt-get install debian-archive-keyring curl gnupg apt-transport-https
VARNISH_VERSION=$VARNISH_VERSION bash -c 'curl -s -L https://packagecloud.io/varnishcache/varnish${VARNISH_VERSION//./}/gpgkey' | sudo apt-key add -
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Changelog

See also the [GitHub releases page](https://github.com/FriendsOfSymfony/FOSHttpCache/releases).

2.15.2
------

* Declare incompatibility with Symfony 7 because it removes `RequestMatcher`.

2.15.1
------

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"symfony/phpunit-bridge": "^5.0 || ^6.0"
},
"conflict": {
"toflar/psr6-symfony-http-cache-store": "<2.2.1"
"toflar/psr6-symfony-http-cache-store": "<2.2.1",
"symfony/http-foundation": ">=7"
},
"suggest": {
"friendsofsymfony/http-cache-bundle": "For integration with the Symfony framework",
Expand Down
2 changes: 2 additions & 0 deletions src/SymfonyCache/EventDispatchingHttpCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ class_exists(CacheEvent::class);
* {@inheritdoc}
*
* Trigger event to alter response before storing it in the cache.
*
* @return void
*/
protected function store(Request $request, Response $response)
{
Expand Down
1 change: 1 addition & 0 deletions src/Test/EventDispatchingHttpCacheTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ protected function getHttpCachePartialMock(array $mockedMethods = null)
'debug' => false,
'default_ttl' => 0,
'private_headers' => ['Authorization', 'Cookie'],
'skip_response_headers' => ['Set-Cookie'],
'allow_reload' => false,
'allow_revalidate' => false,
'stale_while_revalidate' => 2,
Expand Down