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 ec80d3c

Browse filesBrowse files
minor #41554 Fix Serializable deprecations triggered by token mocks (derrabus)
This PR was merged into the 4.4 branch. Discussion ---------- Fix Serializable deprecations triggered by token mocks | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Part of #41552 | License | MIT | Doc PR | N/A On 4.4, `TokenInterface` extends `Serializable` but does not enforce implementations to implement `__serialize()` as well. When creating a mock from this interface, PHPUnit will emit code that triggers a deprecation warning on PHP 8.1. This PR introduces stricter versions of `TokenInterface` to work around that problem. My goal was to keep the diff small and mergable. We can probably drop most of the changes when merging to 5.2 because the two methods have been added there. Commits ------- 48e76fa Fix Serializable deprecations triggered by token mocks
2 parents c127120 + 48e76fa commit ec80d3c
Copy full SHA for ec80d3c

File tree

Expand file treeCollapse file tree

50 files changed

+122
-43
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

50 files changed

+122
-43
lines changed

‎src/Symfony/Bridge/Twig/Tests/AppVariableTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Tests/AppVariableTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
use PHPUnit\Framework\TestCase;
66
use Symfony\Bridge\Twig\AppVariable;
7+
use Symfony\Bridge\Twig\Tests\Fixtures\TokenInterface;
78
use Symfony\Component\HttpFoundation\Request;
89
use Symfony\Component\HttpFoundation\RequestStack;
910
use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
1011
use Symfony\Component\HttpFoundation\Session\Session;
1112
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
12-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1313
use Symfony\Component\Security\Core\User\UserInterface;
1414

1515
class AppVariableTest extends TestCase
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Symfony\Bridge\Twig\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+
}
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Symfony\Bundle\FrameworkBundle\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+
}

‎src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
1313

1414
use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables;
15+
use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\TokenInterface;
1516
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1617
use Symfony\Component\DependencyInjection\Container;
1718
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
18-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1919
use Symfony\Component\Security\Core\User\UserInterface;
2020

2121
/**
+11Lines 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+
}

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/EventAliasTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/EventAliasTest.php
+1-1Lines 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;

‎src/Symfony/Bundle/SecurityBundle/Tests/SecurityUserValueResolverTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/SecurityUserValueResolverTest.php
+1-1Lines 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
/**

‎src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
1616
use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager;
1717
use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface;
18-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1918
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
2019
use Symfony\Component\Security\Core\AuthenticationEvents;
2120
use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent;
2221
use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent;
2322
use Symfony\Component\Security\Core\Exception\AccountStatusException;
2423
use Symfony\Component\Security\Core\Exception\AuthenticationException;
2524
use Symfony\Component\Security\Core\Exception\ProviderNotFoundException;
25+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2626

2727
class AuthenticationProviderManagerTest extends TestCase
2828
{

‎src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver;
1616
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
1717
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
18-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
18+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
1919

2020
class AuthenticationTrustResolverTest extends TestCase
2121
{

‎src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider;
1616
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
17-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1817
use Symfony\Component\Security\Core\Exception\AuthenticationException;
1918
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
19+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2020

2121
class AnonymousAuthenticationProviderTest extends TestCase
2222
{

‎src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider;
16-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1716
use Symfony\Component\Security\Core\Exception\AuthenticationException;
1817
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
1918
use Symfony\Component\Security\Core\Exception\LockedException;
19+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2020
use Symfony\Component\Security\Core\User\UserCheckerInterface;
2121
use Symfony\Component\Security\Core\User\UserInterface;
2222
use Symfony\Component\Security\Core\User\UserProviderInterface;

‎src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider;
1616
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
17-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1817
use Symfony\Component\Security\Core\Exception\AuthenticationException;
1918
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
2019
use Symfony\Component\Security\Core\Exception\DisabledException;
2120
use Symfony\Component\Security\Core\Exception\LogicException;
21+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2222
use Symfony\Component\Security\Core\User\User;
2323
use Symfony\Component\Security\Core\User\UserCheckerInterface;
2424
use Symfony\Component\Security\Core\User\UserInterface;

‎src/Symfony/Component/Security/Core/Tests/Authentication/Provider/SimpleAuthenticationProviderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authentication/Provider/SimpleAuthenticationProviderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Security\Core\Authentication\Provider\SimpleAuthenticationProvider;
1616
use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface;
17-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1817
use Symfony\Component\Security\Core\Exception\DisabledException;
1918
use Symfony\Component\Security\Core\Exception\LockedException;
19+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2020
use Symfony\Component\Security\Core\User\UserChecker;
2121
use Symfony\Component\Security\Core\User\UserCheckerInterface;
2222
use Symfony\Component\Security\Core\User\UserInterface;

‎src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider;
1616
use Symfony\Component\Security\Core\Authentication\Token\SwitchUserToken;
17-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1817
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
1918
use Symfony\Component\Security\Core\Exception\AccountExpiredException;
2019
use Symfony\Component\Security\Core\Exception\AuthenticationException;
@@ -23,6 +22,7 @@
2322
use Symfony\Component\Security\Core\Exception\CredentialsExpiredException;
2423
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
2524
use Symfony\Component\Security\Core\Role\SwitchUserRole;
25+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2626
use Symfony\Component\Security\Core\User\UserCheckerInterface;
2727
use Symfony\Component\Security\Core\User\UserInterface;
2828

‎src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/UsageTrackingTokenStorageTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/UsageTrackingTokenStorageTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\HttpFoundation\Session\SessionInterface;
1717
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
1818
use Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage;
19-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
19+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2020
use Symfony\Contracts\Service\ServiceLocatorTrait;
2121

2222
class UsageTrackingTokenStorageTest extends TestCase

‎src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
namespace Symfony\Component\Security\Core\Tests\Authorization;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1615
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
1716
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
17+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
1818

1919
class AccessDecisionManagerTest extends TestCase
2020
{

‎src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
namespace Symfony\Component\Security\Core\Tests\Authorization;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1615
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
1716
use Symfony\Component\Security\Core\Authorization\DebugAccessDecisionManager;
1817
use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager;
1918
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
19+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2020

2121
class TraceableAccessDecisionManagerTest extends TestCase
2222
{

‎src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver;
1616
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
1717
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
18-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1918
use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter;
2019
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
20+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2121

2222
class AuthenticatedVoterTest extends TestCase
2323
{

‎src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
use Symfony\Component\ExpressionLanguage\Expression;
1616
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface;
1717
use Symfony\Component\Security\Core\Authentication\Token\AbstractToken;
18-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1918
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
2019
use Symfony\Component\Security\Core\Authorization\ExpressionLanguage;
2120
use Symfony\Component\Security\Core\Authorization\Voter\ExpressionVoter;
2221
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
2322
use Symfony\Component\Security\Core\Role\Role;
23+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2424

2525
class ExpressionVoterTest extends TestCase
2626
{

‎src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Security\Core\Authentication\Token\AbstractToken;
16-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1716
use Symfony\Component\Security\Core\Authorization\Voter\RoleVoter;
1817
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
1918
use Symfony\Component\Security\Core\Role\Role;
19+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2020

2121
class RoleVoterTest extends TestCase
2222
{

‎src/Symfony/Component/Security/Core/Tests/Authorization/Voter/TraceableVoterTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authorization/Voter/TraceableVoterTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
namespace Symfony\Component\Security\Core\Tests\Authorization\Voter;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1615
use Symfony\Component\Security\Core\Authorization\Voter\TraceableVoter;
1716
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
1817
use Symfony\Component\Security\Core\Event\VoteEvent;
18+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
1919
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
2020

2121
class TraceableVoterTest extends TestCase

‎src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1616
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
1717
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
18+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface as StrictTokenInterface;
1819

1920
class VoterTest extends TestCase
2021
{
2122
protected $token;
2223

2324
protected function setUp(): void
2425
{
25-
$this->token = $this->createMock(TokenInterface::class);
26+
$this->token = $this->createMock(StrictTokenInterface::class);
2627
}
2728

2829
public function getTests()
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Symfony\Component\Security\Core\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+
}

‎src/Symfony/Component/Security/Core/Tests/Role/SwitchUserRoleTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Role/SwitchUserRoleTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
namespace Symfony\Component\Security\Core\Tests\Role;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1615
use Symfony\Component\Security\Core\Role\SwitchUserRole;
16+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
1717

1818
/**
1919
* @group legacy

‎src/Symfony/Component/Security/Core/Tests/SecurityTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/SecurityTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Psr\Container\ContainerInterface;
1616
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
17-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1817
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
1918
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
2019
use Symfony\Component\Security\Core\Security;
20+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
2121
use Symfony\Component\Security\Core\User\User;
2222

2323
class SecurityTest extends TestCase

‎src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
use Foo\Bar\User;
1515
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
16-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1716
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
1817
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
18+
use Symfony\Component\Security\Core\Tests\Fixtures\TokenInterface;
1919
use Symfony\Component\Security\Core\User\UserInterface;
2020
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
2121
use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator;

‎src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
use Symfony\Component\HttpFoundation\Response;
1818
use Symfony\Component\HttpKernel\Event\RequestEvent;
1919
use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager;
20-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
2120
use Symfony\Component\Security\Core\Exception\AuthenticationException;
2221
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
2322
use Symfony\Component\Security\Core\Exception\LockedException;
2423
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
2524
use Symfony\Component\Security\Guard\AuthenticatorInterface;
2625
use Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener;
2726
use Symfony\Component\Security\Guard\GuardAuthenticatorHandler;
27+
use Symfony\Component\Security\Guard\Tests\Fixtures\TokenInterface;
2828
use Symfony\Component\Security\Guard\Token\PreAuthenticationGuardToken;
2929
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
3030

+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Symfony\Component\Security\Guard\Tests\Fixtures;
4+
5+
use Symfony\Component\Security\Guard\Token\GuardTokenInterface as BaseGuardTokenInterface;
6+
7+
interface GuardTokenInterface extends BaseGuardTokenInterface
8+
{
9+
public function __serialize(): array;
10+
public function __unserialize(array $data): void;
11+
}
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Symfony\Component\Security\Guard\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+
}

‎src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
use Symfony\Component\HttpFoundation\Response;
1717
use Symfony\Component\HttpFoundation\Session\SessionInterface;
1818
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
19-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
2019
use Symfony\Component\Security\Core\Exception\AuthenticationException;
2120
use Symfony\Component\Security\Guard\AuthenticatorInterface;
2221
use Symfony\Component\Security\Guard\GuardAuthenticatorHandler;
22+
use Symfony\Component\Security\Guard\Tests\Fixtures\TokenInterface;
2323
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
2424
use Symfony\Component\Security\Http\SecurityEvents;
2525
use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface;

‎src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use Symfony\Component\Security\Core\User\UserProviderInterface;
2121
use Symfony\Component\Security\Guard\AuthenticatorInterface;
2222
use Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider;
23-
use Symfony\Component\Security\Guard\Token\GuardTokenInterface;
23+
use Symfony\Component\Security\Guard\Tests\Fixtures\GuardTokenInterface;
2424
use Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken;
2525
use Symfony\Component\Security\Guard\Token\PreAuthenticationGuardToken;
2626

‎src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
use Symfony\Component\HttpFoundation\Request;
1616
use Symfony\Component\HttpFoundation\Session\SessionInterface;
1717
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
18-
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1918
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler;
2019
use Symfony\Component\Security\Http\HttpUtils;
20+
use Symfony\Component\Security\Http\Tests\Fixtures\TokenInterface;
2121

2222
class DefaultAuthenticationSuccessHandlerTest extends TestCase
2323
{

0 commit comments

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