From 1093ffe79fcdc1f6688bfe6a37e10b6cabff7119 Mon Sep 17 00:00:00 2001 From: Ronan Giron Date: Thu, 29 Aug 2024 15:40:06 +0200 Subject: [PATCH] Fix deprecated use of spaceless filter on Twig --- resources/Twig/Debug.twig | 6 ++---- resources/Twig/Debug/router.html.twig | 18 ++++++++---------- resources/Twig/Http/error.html.twig | 17 +++++++---------- resources/Twig/Http/maintenance.html.twig | 4 +--- tests/Container/ServiceProviderTest.php | 10 +++++----- 5 files changed, 23 insertions(+), 32 deletions(-) diff --git a/resources/Twig/Debug.twig b/resources/Twig/Debug.twig index 2c50eda..57f2663 100644 --- a/resources/Twig/Debug.twig +++ b/resources/Twig/Debug.twig @@ -1,6 +1,4 @@ {% if app.isDebugEnabled -%} - {% apply spaceless %} - - - {% endapply %} + {{- '' }} + {{- '' }} {%- endif %} diff --git a/resources/Twig/Debug/router.html.twig b/resources/Twig/Debug/router.html.twig index 5012406..3b62f42 100644 --- a/resources/Twig/Debug/router.html.twig +++ b/resources/Twig/Debug/router.html.twig @@ -179,16 +179,14 @@ Host: {{ section.serverRequest.uri.host }} {% set routeFound = false %} {%- for route in section.routes %} {{ route.name|default('--') }} diff --git a/resources/Twig/Http/error.html.twig b/resources/Twig/Http/error.html.twig index 4fad0b0..2d29e65 100644 --- a/resources/Twig/Http/error.html.twig +++ b/resources/Twig/Http/error.html.twig @@ -1,16 +1,13 @@ - {% apply spaceless %} - - {% if httpException.code < 500 %} - Oops, the page you're looking for doesn't exist - {% elseif httpException.code >= 500 %} - Looks like we're having some server issues - {% endif %} - - {{ httpException.code }} error - - {% endapply %} + + {%- if httpException.code < 500 -%} + Oops, the page you're looking for doesn't exist + {%- elseif httpException.code >= 500 -%} + Looks like we're having some server issues + {%- endif -%} + {{- ' ' }}- {{ httpException.code }} error