From 3e367357e43918541a1f951507dcd1e324086d05 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Wed, 4 Sep 2024 08:18:35 +0200 Subject: [PATCH] Remove deprecated spaceless filter (#470) * Remove deprecated spaceless filter > Since twig/twig 3.12: Twig Filter "spaceless" is deprecated * Remove spaces in test --- src/Resources/views/stack.html.twig | 18 ++++++++---------- tests/Functional/ProfilerTest.php | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/Resources/views/stack.html.twig b/src/Resources/views/stack.html.twig index f2984743..3c9102a5 100644 --- a/src/Resources/views/stack.html.twig +++ b/src/Resources/views/stack.html.twig @@ -7,16 +7,14 @@ {% endif %} {{ stack.requestMethod }} - {% apply spaceless %} -
- {{ stack.requestScheme }}:// - {{ stack.requestHost }} - {% if stack.requestPort not in [null, 80, 443] %} - :{{ stack.requestPort }} - {% endif %} - {{ (stack.requestTarget|default('/') starts with '/' ? '' : '/') ~ stack.requestTarget }} -
- {% endapply %} +
+ {{ stack.requestScheme }}:// + {{ stack.requestHost }} + {% if stack.requestPort not in [null, 80, 443] %} + :{{ stack.requestPort }} + {% endif %} + {{ (stack.requestTarget|default('/') starts with '/' ? '' : '/') ~ stack.requestTarget }} +
{{ stack.duration|number_format }} ms {% if stack.responseCode >= 400 and stack.responseCode <= 599 %} diff --git a/tests/Functional/ProfilerTest.php b/tests/Functional/ProfilerTest.php index 9a4705d9..15b5ba7f 100644 --- a/tests/Functional/ProfilerTest.php +++ b/tests/Functional/ProfilerTest.php @@ -28,7 +28,7 @@ public function testShowProfiler(): void $client->request('GET', '/_profiler/latest?panel=httplug'); $content = $client->getResponse()->getContent(); $this->assertStringContainsString(<<https://jsonplaceholder.typicode.com/posts/1
+ jsonplaceholder.typicode.com HTML, $content); } }