From 55c6bae5880669b11195f7a8cff9c62f616e8529 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Tue, 3 Sep 2024 19:50:13 +0200 Subject: [PATCH 1/5] Remove deprecated spaceless filter > Since twig/twig 3.12: Twig Filter "spaceless" is deprecated --- src/Resources/views/stack.html.twig | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 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 %} From 7ca58f1d4cb97160a34fce9c39ab6510e437a541 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Tue, 3 Sep 2024 19:56:27 +0200 Subject: [PATCH 2/5] Remove spaces in test --- tests/Functional/ProfilerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Functional/ProfilerTest.php b/tests/Functional/ProfilerTest.php index 9a4705d9..c6830853 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
- HTML, $content); +
https://jsonplaceholder.typicode.com/posts/1
+ HTML, str_replace(" ", "", $content)); } } From 3fa835db5a60f67324ad0cea86cadfceb54e3dd7 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Tue, 3 Sep 2024 19:57:25 +0200 Subject: [PATCH 3/5] Single quotes --- tests/Functional/ProfilerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Functional/ProfilerTest.php b/tests/Functional/ProfilerTest.php index c6830853..b5df1d84 100644 --- a/tests/Functional/ProfilerTest.php +++ b/tests/Functional/ProfilerTest.php @@ -29,6 +29,6 @@ public function testShowProfiler(): void $content = $client->getResponse()->getContent(); $this->assertStringContainsString(<<https://jsonplaceholder.typicode.com/posts/1 - HTML, str_replace(" ", "", $content)); + HTML, str_replace(' ', '', $content)); } } From 11b3cc9e401a1ba1ffa7a15355ad7c9ec4aa5414 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Tue, 3 Sep 2024 19:58:03 +0200 Subject: [PATCH 4/5] Also remove newlines --- tests/Functional/ProfilerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Functional/ProfilerTest.php b/tests/Functional/ProfilerTest.php index b5df1d84..c3b3816a 100644 --- a/tests/Functional/ProfilerTest.php +++ b/tests/Functional/ProfilerTest.php @@ -29,6 +29,6 @@ public function testShowProfiler(): void $content = $client->getResponse()->getContent(); $this->assertStringContainsString(<<https://jsonplaceholder.typicode.com/posts/1 - HTML, str_replace(' ', '', $content)); + HTML, str_replace([' ', "\n"], ['', ''], $content)); } } From 1a9aa2a164ec6bda68ef34ecb86c67e8319ffc7c Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Tue, 3 Sep 2024 19:59:22 +0200 Subject: [PATCH 5/5] Simpler assert --- tests/Functional/ProfilerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Functional/ProfilerTest.php b/tests/Functional/ProfilerTest.php index c3b3816a..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 - HTML, str_replace([' ', "\n"], ['', ''], $content)); + jsonplaceholder.typicode.com + HTML, $content); } }