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 619acd2

Browse filesBrowse files
committed
minor #12787 [FrameworkBundle] Update deprecated service call (lrlopez)
This PR was merged into the 2.6 branch. Discussion ---------- [FrameworkBundle] Update deprecated service call | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none, but related to #11593 and #11690 | License | MIT | Doc PR | none 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 introduced in Symfony 2.6. Commits ------- 2625193 [FrameworkBundle] Update deprecated service call
2 parents 5b6a95c + 2625193 commit 619acd2
Copy full SHA for 619acd2

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.