From 933c06fde14f808146dd31bae9e32fc8b9ece759 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 29 Jan 2021 15:17:13 +0100 Subject: [PATCH 1/4] Deprecate ez_http_tag_location Mark ez_http_cache_tag_location as deprecated and ez_http_cache_tag_location as its alternative. --- src/Twig/ContentTaggingExtension.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Twig/ContentTaggingExtension.php b/src/Twig/ContentTaggingExtension.php index bfa75424..b4bf533f 100644 --- a/src/Twig/ContentTaggingExtension.php +++ b/src/Twig/ContentTaggingExtension.php @@ -43,7 +43,8 @@ public function getFunctions() // For 2.5 BC, and to be consistent with the other functions, to be cleaned up with new prefix in the future new TwigFunction( 'ez_http_tag_location', - [$this, 'tagHttpCacheForLocation'] + [$this, 'tagHttpCacheForLocation'], + ['deprecated' => true, 'alternative' => 'ez_http_cache_tag_location'] ), new TwigFunction( 'ez_http_tag_relation_ids', From acb6e9459a4b3691aace706a065355889fc01083 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 1 Feb 2021 10:48:14 +0100 Subject: [PATCH 2/4] Format src/Twig/ContentTaggingExtension.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Adam Wójs --- src/Twig/ContentTaggingExtension.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Twig/ContentTaggingExtension.php b/src/Twig/ContentTaggingExtension.php index b4bf533f..5262495e 100644 --- a/src/Twig/ContentTaggingExtension.php +++ b/src/Twig/ContentTaggingExtension.php @@ -44,7 +44,10 @@ public function getFunctions() new TwigFunction( 'ez_http_tag_location', [$this, 'tagHttpCacheForLocation'], - ['deprecated' => true, 'alternative' => 'ez_http_cache_tag_location'] + [ + 'deprecated' => true, + 'alternative' => 'ez_http_cache_tag_location', + ] ), new TwigFunction( 'ez_http_tag_relation_ids', From a0019d21db9c11a5175b1d33e0b813ca3c48cd1e Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 9 Feb 2021 09:25:19 +0100 Subject: [PATCH 3/4] ez_http_cache_tag_ prefix on every Twig function Add ez_http_cache_tag_relation_ids and ez_http_cache_tag_relation_location_ids along ez_http_cache_tag_location for consistency. Deprecate all --- src/Twig/ContentTaggingExtension.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/Twig/ContentTaggingExtension.php b/src/Twig/ContentTaggingExtension.php index 5262495e..7d9adee9 100644 --- a/src/Twig/ContentTaggingExtension.php +++ b/src/Twig/ContentTaggingExtension.php @@ -40,6 +40,14 @@ public function getFunctions() 'ez_http_cache_tag_location', [$this, 'tagHttpCacheForLocation'] ), + new TwigFunction( + 'ez_http_cache_tag_relation_ids', + [$this, 'tagHttpCacheForRelationIds'] + ), + new TwigFunction( + 'ez_http_cache_tag_relation_location_ids', + [$this, 'tagHttpCacheForRelationLocationIds'] + ), // For 2.5 BC, and to be consistent with the other functions, to be cleaned up with new prefix in the future new TwigFunction( 'ez_http_tag_location', @@ -51,11 +59,19 @@ public function getFunctions() ), new TwigFunction( 'ez_http_tag_relation_ids', - [$this, 'tagHttpCacheForRelationIds'] + [$this, 'tagHttpCacheForRelationIds'], + [ + 'deprecated' => true, + 'alternative' => 'ez_http_cache_tag_relation_ids', + ] ), new TwigFunction( 'ez_http_tag_relation_location_ids', - [$this, 'tagHttpCacheForRelationLocationIds'] + [$this, 'tagHttpCacheForRelationLocationIds'], + [ + 'deprecated' => true, + 'alternative' => 'ez_http_cache_tag_relation_location_ids', + ] ), ]; } From 66667183dee5929c007815f1daa6521083a9c697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Mon, 22 Feb 2021 15:53:35 +0100 Subject: [PATCH 4/4] Fixed code style issues --- src/Twig/ContentTaggingExtension.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Twig/ContentTaggingExtension.php b/src/Twig/ContentTaggingExtension.php index 7d9adee9..a574e2d9 100644 --- a/src/Twig/ContentTaggingExtension.php +++ b/src/Twig/ContentTaggingExtension.php @@ -53,7 +53,7 @@ public function getFunctions() 'ez_http_tag_location', [$this, 'tagHttpCacheForLocation'], [ - 'deprecated' => true, + 'deprecated' => true, 'alternative' => 'ez_http_cache_tag_location', ] ), @@ -61,7 +61,7 @@ public function getFunctions() 'ez_http_tag_relation_ids', [$this, 'tagHttpCacheForRelationIds'], [ - 'deprecated' => true, + 'deprecated' => true, 'alternative' => 'ez_http_cache_tag_relation_ids', ] ), @@ -69,7 +69,7 @@ public function getFunctions() 'ez_http_tag_relation_location_ids', [$this, 'tagHttpCacheForRelationLocationIds'], [ - 'deprecated' => true, + 'deprecated' => true, 'alternative' => 'ez_http_cache_tag_relation_location_ids', ] ),