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 0b81a75

Browse filesBrowse files
committed
[SecurityBundle] Add service alias for legacy Security helper
1 parent b44831b commit 0b81a75
Copy full SHA for 0b81a75

File tree

2 files changed

+4
-0
lines changed
Filter options

2 files changed

+4
-0
lines changed

‎src/Symfony/Bundle/SecurityBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Add the `Security` helper class
8+
* Deprecate the `Symfony\Component\Security\Core\Security` service alias, use `Symfony\Bundle\SecurityBundle\Security\Security` instead
89

910
6.1
1011
---

‎src/Symfony/Bundle/SecurityBundle/Resources/config/security.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Resources/config/security.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
use Symfony\Component\Security\Core\Authorization\Voter\RoleVoter;
3535
use Symfony\Component\Security\Core\Role\RoleHierarchy;
3636
use Symfony\Component\Security\Core\Role\RoleHierarchyInterface;
37+
use Symfony\Component\Security\Core\Security as LegacySecurity;
3738
use Symfony\Component\Security\Core\User\ChainUserProvider;
3839
use Symfony\Component\Security\Core\User\InMemoryUserChecker;
3940
use Symfony\Component\Security\Core\User\InMemoryUserProvider;
@@ -81,6 +82,8 @@
8182
'security.authorization_checker' => service('security.authorization_checker'),
8283
])])
8384
->alias(Security::class, 'security.helper')
85+
->alias(LegacySecurity::class, 'security.helper')
86+
->deprecate('symfony/security-bundle', '6.2', 'The "%alias_id%" service alias is deprecated, use "'.Security::class.'" instead.')
8487

8588
->set('security.user_value_resolver', UserValueResolver::class)
8689
->args([

0 commit comments

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