From a6d07c58fe5a0fcd64ad35abfac79bb1cb4caa8a Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Thu, 1 Dec 2022 11:23:43 +0100 Subject: [PATCH] use tag header parser --- CHANGELOG.md | 6 ++++++ composer.json | 2 +- src/Http/SymfonyResponseTagger.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b7ff133..d99f448b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changelog ========= +2.14.0 +------ + +* Fix handling of custom glue for response tags. If you use custom glue with the Symfony HttpCache, + you can now configure a customized tag header parser on the `PurgeTagsListener`. + 2.13.0 ------ diff --git a/composer.json b/composer.json index 9ed44f85..a4d4cf42 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ ], "require": { "php": "^7.3 || ^8.0", - "friendsofsymfony/http-cache": "^2.6", + "friendsofsymfony/http-cache": "^2.15", "symfony/framework-bundle": "^4.4.0 || ^5.0 || ^6.0", "symfony/http-foundation": "^4.4.0 || ^5.0 || ^6.0", "symfony/http-kernel": "^4.4.0 || ^5.0 || ^6.0" diff --git a/src/Http/SymfonyResponseTagger.php b/src/Http/SymfonyResponseTagger.php index 6ee6a044..924488c5 100644 --- a/src/Http/SymfonyResponseTagger.php +++ b/src/Http/SymfonyResponseTagger.php @@ -34,7 +34,7 @@ public function tagSymfonyResponse(Response $response, $replace = false) if (!$replace && $response->headers->has($this->getTagsHeaderName())) { $header = $response->headers->get($this->getTagsHeaderName()); if ('' !== $header) { - $this->addTags(explode(',', $response->headers->get($this->getTagsHeaderName()))); + $this->addTags($this->parseTagsHeaderValue($response->headers->get($this->getTagsHeaderName()))); } }