Skip to content

Commit 87a8f01

Browse files
use Symfony\Bundle\SecurityBundle\Security instead of deprecated \Symfony\Component\Security\Core\Security
1 parent 49c4b01 commit 87a8f01

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

src/Component/EntityLog/Detection/DetectionFacade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Shopsys\FrameworkBundle\Component\EntityLog\Detection;
66

77
use Shopsys\FrameworkBundle\Component\EntityLog\Enum\EntityLogSourceEnum;
8-
use Symfony\Component\Security\Core\Security;
8+
use Symfony\Bundle\SecurityBundle\Security;
99

1010
class DetectionFacade
1111
{
@@ -14,7 +14,7 @@ class DetectionFacade
1414
protected ?string $userIdentifier = null;
1515

1616
/**
17-
* @param \Symfony\Component\Security\Core\Security $security
17+
* @param \Symfony\Bundle\SecurityBundle\Security $security
1818
*/
1919
public function __construct(
2020
protected readonly Security $security,

src/Form/Admin/Administrator/AdministratorFormType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
use Shopsys\FrameworkBundle\Model\Administrator\RoleGroup\AdministratorRoleGroup;
1616
use Shopsys\FrameworkBundle\Model\Administrator\RoleGroup\AdministratorRoleGroupFacade;
1717
use Shopsys\FrameworkBundle\Model\Security\Roles;
18+
use Symfony\Bundle\SecurityBundle\Security;
1819
use Symfony\Component\Form\AbstractType;
1920
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
2021
use Symfony\Component\Form\Extension\Core\Type\EmailType;
2122
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
2223
use Symfony\Component\Form\Extension\Core\Type\TextType;
2324
use Symfony\Component\Form\FormBuilderInterface;
2425
use Symfony\Component\OptionsResolver\OptionsResolver;
25-
use Symfony\Component\Security\Core\Security;
2626
use Symfony\Component\Validator\Constraints;
2727

2828
class AdministratorFormType extends AbstractType
@@ -31,7 +31,7 @@ class AdministratorFormType extends AbstractType
3131
public const string SCENARIO_EDIT = 'edit';
3232

3333
/**
34-
* @param \Symfony\Component\Security\Core\Security $security
34+
* @param \Symfony\Bundle\SecurityBundle\Security $security
3535
* @param \Shopsys\FrameworkBundle\Model\Administrator\RoleGroup\AdministratorRoleGroupFacade $administratorRoleGroupFacade
3636
* @param \Shopsys\FrameworkBundle\Model\Security\Roles $roles
3737
* @param \Shopsys\FrameworkBundle\Component\Router\Security\RouteCsrfProtector $routeCsrfProtector

src/Model/AdminNavigation/MenuItemsGrantedRolesSubscriber.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
use Knp\Menu\ItemInterface;
88
use Shopsys\FrameworkBundle\Model\Security\MenuItemsGrantedRolesSetting;
9+
use Symfony\Bundle\SecurityBundle\Security;
910
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
10-
use Symfony\Component\Security\Core\Security;
1111

1212
class MenuItemsGrantedRolesSubscriber implements EventSubscriberInterface
1313
{
1414
/**
15-
* @param \Symfony\Component\Security\Core\Security $security
15+
* @param \Symfony\Bundle\SecurityBundle\Security $security
1616
* @param \Shopsys\FrameworkBundle\Model\Security\MenuItemsGrantedRolesSetting $menuItemsGrantedRolesSetting
1717
*/
1818
public function __construct(

src/Model/Customer/User/Role/CustomerUserRoleResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
namespace Shopsys\FrameworkBundle\Model\Customer\User\Role;
66

77
use Shopsys\FrameworkBundle\Model\Customer\User\CustomerUser;
8+
use Symfony\Bundle\SecurityBundle\Security;
89
use Symfony\Component\Security\Core\Role\RoleHierarchyInterface;
9-
use Symfony\Component\Security\Core\Security;
1010

1111
class CustomerUserRoleResolver
1212
{
1313
/**
1414
* @param \Symfony\Component\Security\Core\Role\RoleHierarchyInterface $roleHierarchy
15-
* @param \Symfony\Component\Security\Core\Security $security
15+
* @param \Symfony\Bundle\SecurityBundle\Security $security
1616
*/
1717
public function __construct(
1818
protected readonly RoleHierarchyInterface $roleHierarchy,

src/Model/Security/CustomerLoginHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Shopsys\FrameworkBundle\Model\Security;
66

77
use Shopsys\FrameworkBundle\Component\Router\CurrentDomainRouter;
8+
use Symfony\Bundle\SecurityBundle\Security;
89
use Symfony\Component\HttpFoundation\JsonResponse;
910
use Symfony\Component\HttpFoundation\RedirectResponse;
1011
use Symfony\Component\HttpFoundation\Request;
@@ -13,7 +14,6 @@
1314
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1415
use Symfony\Component\Security\Core\Exception\AuthenticationException;
1516
use Symfony\Component\Security\Core\Exception\TooManyLoginAttemptsAuthenticationException;
16-
use Symfony\Component\Security\Core\Security;
1717
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
1818
use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface;
1919

tests/Unit/Model/Customer/Mock/TokenMock.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public function unserialize(string $data)
3030
{
3131
}
3232

33+
/**
34+
* @return string
35+
*/
3336
public function __toString(): string
3437
{
3538
return '';

0 commit comments

Comments
 (0)