From 5a8b4748f7758fbe0914155710000f29f5cbc546 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 14 Jan 2023 23:21:38 +0100 Subject: [PATCH] Revert wrong typehint for getSession --- stubs/Symfony/Component/HttpFoundation/Request.stub | 5 ----- tests/Type/Symfony/data/request_get_session.php | 6 +++--- tests/Type/Symfony/data/request_get_session_null.php | 6 +++--- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/stubs/Symfony/Component/HttpFoundation/Request.stub b/stubs/Symfony/Component/HttpFoundation/Request.stub index 861769df..0c2140cc 100644 --- a/stubs/Symfony/Component/HttpFoundation/Request.stub +++ b/stubs/Symfony/Component/HttpFoundation/Request.stub @@ -26,11 +26,6 @@ class Request */ public $cookies; - /** - * @return \Symfony\Component\HttpFoundation\Session\Session - */ - public function getSession(); - /** * @return string[] */ diff --git a/tests/Type/Symfony/data/request_get_session.php b/tests/Type/Symfony/data/request_get_session.php index 17ef88a6..9a0335e5 100644 --- a/tests/Type/Symfony/data/request_get_session.php +++ b/tests/Type/Symfony/data/request_get_session.php @@ -1,14 +1,14 @@ getSession(); -assertType(Session::class, $request->getSession()); +assertType(SessionInterface::class, $request->getSession()); if ($request->hasSession()) { - assertType(Session::class, $request->getSession()); + assertType(SessionInterface::class, $request->getSession()); } diff --git a/tests/Type/Symfony/data/request_get_session_null.php b/tests/Type/Symfony/data/request_get_session_null.php index be0fd0d1..9c37979d 100644 --- a/tests/Type/Symfony/data/request_get_session_null.php +++ b/tests/Type/Symfony/data/request_get_session_null.php @@ -1,14 +1,14 @@ getSession(); -assertType(Session::class . '|null', $request->getSession()); +assertType(SessionInterface::class . '|null', $request->getSession()); if ($request->hasSession()) { - assertType(Session::class, $request->getSession()); + assertType(SessionInterface::class, $request->getSession()); }