diff --git a/src/Twig/Extension/ResponseExtension.php b/src/Twig/Extension/ResponseExtension.php deleted file mode 100644 index 33187b8..0000000 --- a/src/Twig/Extension/ResponseExtension.php +++ /dev/null @@ -1,24 +0,0 @@ -getStatusText(...)), - ]; - } - - public function getStatusText(int $errorCode): string - { - return Response::$statusTexts[$errorCode] ?? 'Unknown error code'; - } -} diff --git a/templates/bundles/TwigBundle/Exception/error.html.twig b/templates/bundles/TwigBundle/Exception/error.html.twig index 9399f32..6712a79 100644 --- a/templates/bundles/TwigBundle/Exception/error.html.twig +++ b/templates/bundles/TwigBundle/Exception/error.html.twig @@ -1,11 +1,13 @@ {% extends 'base.html.twig' %} +{% block title %}Error {{ status_code }}{% endblock %} + {% block body %}
Oops! An Error {{ status_code }} occured!

-

Sorry, but an error {{ status_code|status_text }} ({{ status_code }}) occured.

+

Sorry, but an error {{ status_text }} ({{ status_code }}) occured.

Homepage

@@ -17,7 +19,7 @@

- Logo by FrankenPHP + Logo by FrankenPHP

diff --git a/tests/Integration/Twig/Extension/ResponseExtensionTest.php b/tests/Integration/Twig/Extension/ResponseExtensionTest.php deleted file mode 100644 index e01fab3..0000000 --- a/tests/Integration/Twig/Extension/ResponseExtensionTest.php +++ /dev/null @@ -1,20 +0,0 @@ -get(ResponseExtension::class); - self::assertNotEmpty($extension->getFilters()); - self::assertSame('Not Found', $extension->getStatusText(Response::HTTP_NOT_FOUND)); - } -}