Skip to content

Commit f549e7a

Browse files
committed
minor #45810 [HttpFoundation] Propagate SessionNotFoundException in Request::getSession docBlock (a.dmitryuk)
This PR was squashed before being merged into the 6.1 branch. Discussion ---------- [HttpFoundation] Propagate SessionNotFoundException in Request::getSession docBlock | Q | A | ------------- | --- | Branch? | 6.1 for features / 4.4, 5.4 or 6.0 for bug fixes <!-- see below --> | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT | Doc PR | Looks like [RequestStack::getSession](https://github.com/symfony/symfony/blob/6.1/src/Symfony/Component/HttpFoundation/RequestStack.php#L99) throws `SessionNotFoundException` exception in Docblock , but [Request](https://github.com/symfony/symfony/blob/6.1/src/Symfony/Component/HttpFoundation/Request.php#L694) don't. The PR adds missing Docblock to Request to solve misleadings. Commits ------- b887ff234b [HttpFoundation] Propagate SessionNotFoundException in Request::getSession docBlock
2 parents af106e1 + fff369e commit f549e7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Request.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,8 @@ public function get(string $key, mixed $default = null): mixed
690690

691691
/**
692692
* Gets the Session.
693+
*
694+
* @throws SessionNotFoundException When session is not set properly
693695
*/
694696
public function getSession(): SessionInterface
695697
{

0 commit comments

Comments
 (0)