From 8335e8f0b2d99379aee23a1531d2bd4ff0c4d93f Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Fri, 2 Aug 2024 14:00:02 +0200 Subject: [PATCH 1/3] 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); From 4df8da89721022f04f792511357a35550fe2e4ac Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Fri, 2 Aug 2024 14:08:11 +0200 Subject: [PATCH 2/3] prepare release --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7efcad74..ec71a9fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ See also the [GitHub releases page](https://github.com/FriendsOfSymfony/FOSHttpC 2.x === -2.16.1 +2.16.2 ------ ### Fixed @@ -14,6 +14,11 @@ See also the [GitHub releases page](https://github.com/FriendsOfSymfony/FOSHttpC * 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.1 +------ + +(Mistaken tag, same as 2.16.0) + 2.16.0 ------ From 4b53b926f8b8e3c4a6f91fc2067a92042dcfffda Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Fri, 2 Aug 2024 14:11:46 +0200 Subject: [PATCH 3/3] re-type the parameter as 3.x does no longer support Symfony 4 --- src/SymfonyCache/EventDispatchingHttpCache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SymfonyCache/EventDispatchingHttpCache.php b/src/SymfonyCache/EventDispatchingHttpCache.php index 65e86dbe..4fc74f0a 100644 --- a/src/SymfonyCache/EventDispatchingHttpCache.php +++ b/src/SymfonyCache/EventDispatchingHttpCache.php @@ -120,7 +120,7 @@ protected function invalidate(Request $request, bool $catch = false): Response return parent::invalidate($request, $catch); } - protected function forward(Request $request, $catch = false, ?Response $entry = null): Response + protected function forward(Request $request, bool $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);