minor #16160 [FrameworkBundle] Deprecate the security.secure_random service (nicolas-grekas)

This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Deprecate the security.secure_random service

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Since the SecureRandom class and interface are already deprecated, so should be the service.

Commits
-------

8b55520 [FrameworkBundle] Deprecate the security.secure_random service
This commit is contained in:
Fabien Potencier 2015-10-07 12:14:23 +02:00
commit bd275a1b09
2 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@
<tag name="monolog.logger" channel="security" />
<argument>%kernel.cache_dir%/secure_random.seed</argument>
<argument type="service" id="logger" on-invalid="ignore" />
<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>
</service>
</services>
</container>

View File

@ -69,6 +69,7 @@ abstract class FrameworkExtensionTest extends TestCase
$this->assertTrue($container->hasDefinition('security.csrf.token_manager'));
}
/** @group legacy */
public function testSecureRandomIsAvailableIfCsrfIsDisabled()
{
$container = $this->createContainerFromFile('csrf_disabled');