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 2625193

Browse filesBrowse files
committed
[FrameworkBundle] Update deprecated service call
The service `security.context` is now deprecated due to PR #11690. This commit updates PR #11593 replacing `security.context` with `security.authorization_checker` in the `isGranted()` controller shortcut.
1 parent 309de6d commit 2625193
Copy full SHA for 2625193

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ protected function addFlash($type, $message)
123123
*/
124124
protected function isGranted($attributes, $object = null)
125125
{
126-
if (!$this->container->has('security.context')) {
126+
if (!$this->container->has('security.authorization_checker')) {
127127
throw new \LogicException('The SecurityBundle is not registered in your application.');
128128
}
129129

130-
return $this->container->get('security.context')->isGranted($attributes, $object);
130+
return $this->container->get('security.authorization_checker')->isGranted($attributes, $object);
131131
}
132132

133133
/**

0 commit comments

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