File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/Symfony/Component/Validator/Constraints Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -38,17 +38,22 @@ class ExpressionValidator extends ConstraintValidator
3838 private $ expressionLanguage ;
3939
4040 /**
41- * @param PropertyAccessorInterface|null $propertyAccessor Optional as of Symfony 2.5
41+ * @param PropertyAccessorInterface|null $propertyAccessor Optional as of Symfony 2.5
42+ * @param ExpressionLanguage|null $expressionLanguage
4243 *
4344 * @throws UnexpectedTypeException If the property accessor is invalid
4445 */
45- public function __construct ($ propertyAccessor = null )
46+ public function __construct ($ propertyAccessor = null , $ expressionLanguage = null )
4647 {
4748 if (null !== $ propertyAccessor && !$ propertyAccessor instanceof PropertyAccessorInterface) {
4849 throw new UnexpectedTypeException ($ propertyAccessor , 'null or \Symfony\Component\PropertyAccess\PropertyAccessorInterface ' );
4950 }
51+ if (null !== $ expressionLanguage && !$ expressionLanguage instanceof ExpressionLanguage) {
52+ throw new UnexpectedTypeException ($ expressionLanguage , 'null or \Symfony\Component\ExpressionLanguage\ExpressionLanguage ' );
53+ }
5054
5155 $ this ->propertyAccessor = $ propertyAccessor ;
56+ $ this ->expressionLanguage = $ expressionLanguage ;
5257 }
5358
5459 /**
You can’t perform that action at this time.
0 commit comments