bug #23417 [DI][Security] Prevent unwanted deprecation notices when using Expression Languages (dunglas)

This PR was merged into the 3.2 branch.

Discussion
----------

[DI][Security] Prevent unwanted deprecation notices when using Expression Languages

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

052b8c3a04 [DI][Security] Prevent unwanted deprecation notices when using Expression Languages
This commit is contained in:
Fabien Potencier 2017-07-06 09:23:57 +03:00
commit 15938b4ffd
2 changed files with 8 additions and 4 deletions

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection;
use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface;
/**
* Adds some function to the default ExpressionLanguage.
@ -23,7 +22,10 @@ use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface;
*/
class ExpressionLanguage extends BaseExpressionLanguage
{
public function __construct(ParserCacheInterface $cache = null, array $providers = array())
/**
* {@inheritdoc}
*/
public function __construct($cache = null, array $providers = array())
{
// prepend the default provider to let users override it easily
array_unshift($providers, new ExpressionLanguageProvider());

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\Security\Core\Authorization;
use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface;
/**
* Adds some function to the default ExpressionLanguage.
@ -23,7 +22,10 @@ use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface;
*/
class ExpressionLanguage extends BaseExpressionLanguage
{
public function __construct(ParserCacheInterface $cache = null, array $providers = array())
/**
* {@inheritdoc}
*/
public function __construct($cache = null, array $providers = array())
{
// prepend the default provider to let users override it easily
array_unshift($providers, new ExpressionLanguageProvider());