From 8335e8f0b2d99379aee23a1531d2bd4ff0c4d93f Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Fri, 2 Aug 2024 14:00:02 +0200 Subject: [PATCH] fix symfony 4 compatibility --- CHANGELOG.md | 8 ++++++++ src/SymfonyCache/EventDispatchingHttpCache.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf687fe6..7efcad74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ See also the [GitHub releases page](https://github.com/FriendsOfSymfony/FOSHttpC 2.x === +2.16.1 +------ + +### Fixed + +* The new `EventDispatchingHttpCache::forward` method added in 2.16.0 was not + compatible with Symfony 4.4. Adjusted the signature to make it compatible. + 2.16.0 ------ diff --git a/src/SymfonyCache/EventDispatchingHttpCache.php b/src/SymfonyCache/EventDispatchingHttpCache.php index 9376e7e8..db334c64 100644 --- a/src/SymfonyCache/EventDispatchingHttpCache.php +++ b/src/SymfonyCache/EventDispatchingHttpCache.php @@ -130,7 +130,7 @@ protected function invalidate(Request $request, $catch = false): Response return parent::invalidate($request, $catch); } - protected function forward(Request $request, bool $catch = false, ?Response $entry = null): Response + protected function forward(Request $request, $catch = false, ?Response $entry = null): Response { // do not abort early, if $entry is set this is a validation request $this->dispatch(Events::PRE_FORWARD, $request, $entry);