Skip to content

Commit 81c2bfd

Browse files
committed
bug symfony#44481 [FrameworkBundle] Fix loginUser() causing deprecation (wouterj)
This PR was merged into the 5.3 branch. Discussion ---------- [FrameworkBundle] Fix loginUser() causing deprecation | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix tests | License | MIT | Doc PR | - Commits ------- 681b4c1 Fix KernelBrowser::loginUser() causing deprecation
2 parents e4870b0 + 681b4c1 commit 81c2bfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function loginUser(object $user, string $firewallContext = 'main'): self
125125
$token = new TestBrowserToken($user->getRoles(), $user, $firewallContext);
126126
// @deprecated since Symfony 5.4
127127
if (method_exists($token, 'setAuthenticated')) {
128-
$token->setAuthenticated(true);
128+
$token->setAuthenticated(true, false);
129129
}
130130

131131
$container = $this->getContainer();

0 commit comments

Comments
 (0)