Skip to content

Commit d89a521

Browse files
VincentLangletondrejmirtes
authored andcommitted
Revert wrong typehint for getSession
1 parent fca0834 commit d89a521

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

stubs/Symfony/Component/HttpFoundation/Request.stub

-5
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ class Request
2626
*/
2727
public $cookies;
2828

29-
/**
30-
* @return \Symfony\Component\HttpFoundation\Session\Session
31-
*/
32-
public function getSession();
33-
3429
/**
3530
* @return string[]
3631
*/
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php declare(strict_types = 1);
22

3-
use Symfony\Component\HttpFoundation\Session\Session;
3+
use Symfony\Component\HttpFoundation\Session\SessionInterface;
44
use function PHPStan\Testing\assertType;
55

66
/** @var \Symfony\Component\HttpFoundation\Request $request */
77
$request = doRequest();
88

99
$session1 = $request->getSession();
10-
assertType(Session::class, $request->getSession());
10+
assertType(SessionInterface::class, $request->getSession());
1111

1212
if ($request->hasSession()) {
13-
assertType(Session::class, $request->getSession());
13+
assertType(SessionInterface::class, $request->getSession());
1414
}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php declare(strict_types = 1);
22

3-
use Symfony\Component\HttpFoundation\Session\Session;
3+
use Symfony\Component\HttpFoundation\Session\SessionInterface;
44
use function PHPStan\Testing\assertType;
55

66
/** @var \Symfony\Component\HttpFoundation\Request $request */
77
$request = doRequest();
88

99
$session1 = $request->getSession();
10-
assertType(Session::class . '|null', $request->getSession());
10+
assertType(SessionInterface::class . '|null', $request->getSession());
1111

1212
if ($request->hasSession()) {
13-
assertType(Session::class, $request->getSession());
13+
assertType(SessionInterface::class, $request->getSession());
1414
}

0 commit comments

Comments
 (0)