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

This commit is contained in:
Kévin Dunglas 2017-07-05 22:19:23 +02:00
parent 692acb4d64
commit 052b8c3a04
No known key found for this signature in database
GPG Key ID: 4D04EBEF06AAF3A6
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());