Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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‎

Lines changed: 0 additions & 5 deletions
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
*/
Lines changed: 3 additions & 3 deletions
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
}
Lines changed: 3 additions & 3 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /