File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ CHANGELOG
4
4
5.3
5
5
---
6
6
7
+ * Calling ` Request::getSession() ` when there is no available session throws a ` SessionNotFoundException `
7
8
* Add the ` RequestStack::getSession ` method
8
9
* Deprecate the ` NamespacedAttributeBag ` class
9
10
* added ` ResponseFormatSame ` PHPUnit constraint
Original file line number Diff line number Diff line change 13
13
14
14
use Symfony \Component \HttpFoundation \Exception \ConflictingHeadersException ;
15
15
use Symfony \Component \HttpFoundation \Exception \JsonException ;
16
+ use Symfony \Component \HttpFoundation \Exception \SessionNotFoundException ;
16
17
use Symfony \Component \HttpFoundation \Exception \SuspiciousOperationException ;
17
18
use Symfony \Component \HttpFoundation \Session \SessionInterface ;
18
19
@@ -735,7 +736,7 @@ public function getSession()
735
736
}
736
737
737
738
if (null === $ session ) {
738
- throw new \ BadMethodCallException ('Session has not been set. ' );
739
+ throw new SessionNotFoundException ('Session has not been set. ' );
739
740
}
740
741
741
742
return $ session ;
You can’t perform that action at this time.
0 commit comments