From fc9e68fded81b8cdb975f950d629d12bb0e963a3 Mon Sep 17 00:00:00 2001 From: Oleg Zhulnev Date: Sun, 5 Jun 2022 11:08:58 +0300 Subject: [PATCH] [http foundation] Improve statusTexts variable type in the Response stub (#258) --- .../Component/HttpFoundation/Response.stubphp | 5 +++++ tests/acceptance/acceptance/Response.feature | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 tests/acceptance/acceptance/Response.feature diff --git a/src/Stubs/common/Component/HttpFoundation/Response.stubphp b/src/Stubs/common/Component/HttpFoundation/Response.stubphp index ad4bafe..3d2a95c 100644 --- a/src/Stubs/common/Component/HttpFoundation/Response.stubphp +++ b/src/Stubs/common/Component/HttpFoundation/Response.stubphp @@ -4,6 +4,11 @@ namespace Symfony\Component\HttpFoundation; class Response { + /** + * @var array + */ + public static $statusTexts; + /** * @throws \InvalidArgumentException When the HTTP status code is not valid * @psalm-taint-sink html $content diff --git a/tests/acceptance/acceptance/Response.feature b/tests/acceptance/acceptance/Response.feature new file mode 100644 index 0000000..f53e08e --- /dev/null +++ b/tests/acceptance/acceptance/Response.feature @@ -0,0 +1,18 @@ +@symfony-common +Feature: Response + + Background: + Given I have Symfony plugin enabled + + Scenario: MixedAssignment error about $statusTexts is not raised + Given I have the following code + """ +