Skip to content

Commit 9d02487

Browse files
committed
Fix Serializable deprecations triggered by token mocks
1 parent 631a2a0 commit 9d02487

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Tests/AppVariableTest.php

Lines 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

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\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+
}

0 commit comments

Comments
 (0)