Skip to content

Commit 63b93fb

Browse files
[FrameworkBundle] Deprecate the security.secure_random service
1 parent bb9136c commit 63b93fb

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Resources/config/security.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<tag name="monolog.logger" channel="security" />
1515
<argument>%kernel.cache_dir%/secure_random.seed</argument>
1616
<argument type="service" id="logger" on-invalid="ignore" />
17+
<deprecated>The "%service_id%" service is deprecated since Symfony 2.8 and will be removed in 3.0. Use the random_bytes() function instead.</deprecated>
1718
</service>
1819
</services>
1920
</container>

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public function testCsrfProtectionForFormsEnablesCsrfProtectionAutomatically()
6969
$this->assertTrue($container->hasDefinition('security.csrf.token_manager'));
7070
}
7171

72+
/** @group legacy */
7273
public function testSecureRandomIsAvailableIfCsrfIsDisabled()
7374
{
7475
$container = $this->createContainerFromFile('csrf_disabled');

0 commit comments

Comments
 (0)