Skip to content

Commit 0e0c5e8

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: [Serializer] Fix denormalizing of array with empty body [Security] Remove annoying deprecation in `UsageTrackingTokenStorage` Bump Symfony version to 5.3.10 Update VERSION for 5.3.9 Fix CHANGELOG Update CHANGELOG for 5.3.9 Bump Symfony version to 4.4.33 Update VERSION for 4.4.32 Fix CHANGELOG Update CHANGELOG for 4.4.32 [Workflow] Remove dead code in XML schemas Bump Symfony version to 5.3.9 Update VERSION for 5.3.8 Update CHANGELOG for 5.3.8 Bump Symfony version to 4.4.32 Update VERSION for 4.4.31 Update CONTRIBUTORS for 4.4.31 Update CHANGELOG for 4.4.31 [Workflow] Add missing audit-trail settings in framework workflow config xsd [Serializer] Fix denormalizing of array with empty body
2 parents 727deb4 + b7c1326 commit 0e0c5e8

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

Authentication/Token/Storage/UsageTrackingTokenStorage.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ private function shouldTrackUsage(): bool
101101
}
102102

103103
if (!$this->container->get('request_stack')->getMainRequest()) {
104-
trigger_deprecation('symfony/security-core', '5.3', 'Using "%s" (service ID: "security.token_storage") outside the request-response cycle is deprecated, use the "%s" class (service ID: "security.untracked_token_storage") instead or disable usage tracking using "disableUsageTracking()".', __CLASS__, TokenStorage::class);
105-
106104
return false;
107105
}
108106

Tests/Authentication/Token/Storage/UsageTrackingTokenStorageTest.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Psr\Container\ContainerInterface;
16-
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
1716
use Symfony\Component\HttpFoundation\Request;
1817
use Symfony\Component\HttpFoundation\RequestStack;
1918
use Symfony\Component\HttpFoundation\Session\SessionInterface;
@@ -24,8 +23,6 @@
2423

2524
class UsageTrackingTokenStorageTest extends TestCase
2625
{
27-
use ExpectDeprecationTrait;
28-
2926
public function testGetSetToken()
3027
{
3128
$sessionAccess = 0;
@@ -69,9 +66,6 @@ public function testGetSetToken()
6966
$this->assertSame(1, $sessionAccess);
7067
}
7168

72-
/**
73-
* @group legacy
74-
*/
7569
public function testWithoutMainRequest()
7670
{
7771
$locator = new class(['request_stack' => function () {
@@ -83,7 +77,6 @@ public function testWithoutMainRequest()
8377
$trackingStorage = new UsageTrackingTokenStorage($tokenStorage, $locator);
8478
$trackingStorage->enableUsageTracking();
8579

86-
$this->expectDeprecation('Since symfony/security-core 5.3: Using "%s" (service ID: "security.token_storage") outside the request-response cycle is deprecated, use the "%s" class (service ID: "security.untracked_token_storage") instead or disable usage tracking using "disableUsageTracking()".');
87-
$trackingStorage->getToken();
80+
$this->assertNull($trackingStorage->getToken());
8881
}
8982
}

0 commit comments

Comments
 (0)