File tree 1 file changed +18
-14
lines changed
Filter options
src/Symfony/Component/Security/Core/Authorization
1 file changed +18
-14
lines changed
Original file line number Diff line number Diff line change 13
13
14
14
use Symfony \Component \ExpressionLanguage \ExpressionLanguage as BaseExpressionLanguage ;
15
15
16
- /**
17
- * Adds some function to the default ExpressionLanguage.
18
- *
19
- * @author Fabien Potencier <fabien@symfony.com>
20
- *
21
- * @see ExpressionLanguageProvider
22
- */
23
- class ExpressionLanguage extends BaseExpressionLanguage
24
- {
16
+ if (!class_exists (BaseExpressionLanguage::class)) {
17
+ throw new \RuntimeException (sprintf ('The "%s" class requires the "ExpressionLanguage" component. Try running "composer require symfony/expression-language". ' , ExpressionLanguage::class));
18
+ } else {
25
19
/**
26
- * {@inheritdoc}
20
+ * Adds some function to the default ExpressionLanguage.
21
+ *
22
+ * @author Fabien Potencier <fabien@symfony.com>
23
+ *
24
+ * @see ExpressionLanguageProvider
27
25
*/
28
- public function __construct ( $ cache = null , array $ providers = array ())
26
+ class ExpressionLanguage extends BaseExpressionLanguage
29
27
{
30
- // prepend the default provider to let users override it easily
31
- array_unshift ($ providers , new ExpressionLanguageProvider ());
28
+ /**
29
+ * {@inheritdoc}
30
+ */
31
+ public function __construct ($ cache = null , array $ providers = array ())
32
+ {
33
+ // prepend the default provider to let users override it easily
34
+ array_unshift ($ providers , new ExpressionLanguageProvider ());
32
35
33
- parent ::__construct ($ cache , $ providers );
36
+ parent ::__construct ($ cache , $ providers );
37
+ }
34
38
}
35
39
}
You can’t perform that action at this time.
0 commit comments