Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 31d13c5

Browse filesBrowse files
committed
minor #11993 When overriding session service definition, make it public (pbowyer)
This PR was merged into the 4.2 branch. Discussion ---------- When overriding `session` service definition, make it public `Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait::addFlash()` relies on getting the `session` service from the service container. Since 3.4 services defined in `services.yaml` are private by default. When overriding the `session` service definition, it has to be explicitly marked as public. The 4.2 documentation branch was the earliest I found containing this example service definition. Commits ------- 315103f When overriding `session` service definition, make it public
2 parents fcca521 + 315103f commit 31d13c5
Copy full SHA for 31d13c5

File tree

1 file changed

+1
-0
lines changed
Filter options

1 file changed

+1
-0
lines changed

‎session.rst

Copy file name to clipboardExpand all lines: session.rst
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ the default ``AttributeBag`` by the ``NamespacedAttributeBag``:
180180
181181
# config/services.yaml
182182
session:
183+
public: true
183184
class: Symfony\Component\HttpFoundation\Session\Session
184185
arguments: ['@session.storage', '@session.namespacedattributebag', '@session.flash_bag']
185186

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.