Skip to content

Commit f4ac7d5

Browse files
committed
Fix Serializable deprecations triggered by token mocks
1 parent 09fc284 commit f4ac7d5

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

Tests/Fixtures/TokenInterface.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Symfony\Bundle\SecurityBundle\Tests\Fixtures;
4+
5+
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface as BaseTokenInterface;
6+
7+
interface TokenInterface extends BaseTokenInterface
8+
{
9+
public function __serialize(): array;
10+
public function __unserialize(array $data): void;
11+
}

Tests/Functional/EventAliasTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
1313

14+
use Symfony\Bundle\SecurityBundle\Tests\Fixtures\TokenInterface;
1415
use Symfony\Component\HttpFoundation\Request;
15-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1616
use Symfony\Component\Security\Core\AuthenticationEvents;
1717
use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent;
1818
use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent;

Tests/SecurityUserValueResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Bundle\SecurityBundle\SecurityUserValueResolver;
16+
use Symfony\Bundle\SecurityBundle\Tests\Fixtures\TokenInterface;
1617
use Symfony\Component\HttpFoundation\Request;
1718
use Symfony\Component\HttpKernel\Controller\ArgumentResolver;
1819
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver;
1920
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
2021
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
21-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
2222
use Symfony\Component\Security\Core\User\UserInterface;
2323

2424
/**

0 commit comments

Comments
 (0)