Skip to content

Commit 70bdf29

Browse files
authored
fix(symfony): ensure the kernel is booted before using KernelBrowser::loginUser() (#7446)
1 parent 1094a52 commit 70bdf29

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Symfony/Bundle/Test/Client.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ private static function extractHeaders(array $options): array
236236

237237
public function loginUser(UserInterface $user, string $firewallContext = 'main'): self
238238
{
239+
$this->kernelBrowser->getKernel()->boot();
240+
239241
$this->kernelBrowser->loginUser($user, $firewallContext);
240242

241243
return $this;

0 commit comments

Comments
 (0)