[FrameworkBundle] make KernelBrowser::loginUser() session available for updating after login

by @arderyp

Some issues have been detected in this pull request

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/47001/60ff65aea0db42c4bf2cab83c7ab315dd0407210/cs.diff | patch -p0
diff -ru src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php
--- src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php	2024-05-15 12:06:32.893308033 +0000
+++ src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php	2024-05-15 12:06:34.216354598 +0000
@@ -36,9 +36,6 @@
     private bool $reboot = true;
     private SessionInterface $session;
 
-    /**
-     * {@inheritdoc}
-     */
     public function __construct(KernelInterface $kernel, array $server = [], History $history = null, CookieJar $cookieJar = null)
     {
         parent::__construct($kernel, $server, $history, $cookieJar);
@@ -150,8 +147,6 @@
     /**
      * Set value on session initialized by loginUser().
      *
-     * @param mixed $value
-     *
      * @return $this
      */
     protected function setLoginSessionValue(string $name, $value): self
@@ -159,14 +154,13 @@
         if (isset($this->session)) {
             $this->session->set($name, $value);
             $this->session->save();
+
             return $this;
         }
-        throw new \LogicException("loginUser() must be called to initialize session");
+        throw new \LogicException('loginUser() must be called to initialize session');
     }
 
     /**
-     * {@inheritdoc}
-     *
      * @param Request $request
      */
     protected function doRequest(object $request): Response
@@ -191,8 +185,6 @@
     }
 
     /**
-     * {@inheritdoc}
-     *
      * @param Request $request
      */
     protected function doRequestInProcess(object $request): Response

0
Common Typos

0
License Headers

0
Pull Request Contributor Headers

0
File Permissions

0
Merge Commits

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/47001/60ff65aea0db42c4bf2cab83c7ab315dd0407210/exception_messages.diff | patch -p0
diff -ru src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php
--- src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php	2024-05-15 12:06:32.893308033 +0000
+++ src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php	2024-05-15 12:06:34.668370507 +0000
@@ -161,7 +161,7 @@
             $this->session->save();
             return $this;
         }
-        throw new \LogicException("loginUser() must be called to initialize session");
+        throw new \LogicException("loginUser() must be called to initialize session.");
     }
 
     /**

0
Usage of void in test files

0
Use ::class whenever possible

0
Deprecation Messages