File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/Symfony/Component/Validator/Constraints Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -38,17 +38,13 @@ class ExpressionValidator extends ConstraintValidator
38
38
private $ expressionLanguage ;
A6BF
39
39
40
40
/**
41
- * @param PropertyAccessorInterface|null $propertyAccessor Optional as of Symfony 2.5
42
- *
43
- * @throws UnexpectedTypeException If the property accessor is invalid
41
+ * @param PropertyAccessorInterface|null $propertyAccessor
42
+ * @param ExpressionLanguage|null $expressionLanguage
44
43
*/
45
- public function __construct ($ propertyAccessor = null )
44
+ public function __construct (PropertyAccessorInterface $ propertyAccessor = null , ExpressionLanguage $ expressionLanguage = null )
46
45
{
47
- if (null !== $ propertyAccessor && !$ propertyAccessor instanceof PropertyAccessorInterface) {
48
- throw new UnexpectedTypeException ($ propertyAccessor , 'null or \Symfony\Component\PropertyAccess\PropertyAccessorInterface ' );
49
- }
50
-
51
46
$ this ->propertyAccessor = $ propertyAccessor ;
47
+ $ this ->expressionLanguage = $ expressionLanguage ;
52
48
}
53
49
54
50
/**
You can’t perform that action at this time.
0 commit comments