You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!isset($options['value']) && !isset($options['propertyPath'])) {
42
-
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires either the "value" or "propertyPath" option to be set.', static::class));
43
-
}
44
+
parent::__construct($options, $groups, $payload);
44
45
45
-
if (isset($options['value']) && isset($options['propertyPath'])) {
46
-
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "value" or "propertyPath" options to be set, not both.', static::class));
if (isset($options['propertyPath']) && !class_exists(PropertyAccess::class)) {
50
-
thrownewLogicException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "propertyPath" option.', static::class));
51
-
}
49
+
if (null === $this->value && null === $this->propertyPath) {
50
+
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires either the "value" or "propertyPath" option to be set.', static::class));
52
51
}
53
52
54
-
parent::__construct($options);
53
+
if (null !== $this->value && null !== $this->propertyPath) {
54
+
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "value" or "propertyPath" options to be set, not both.', static::class));
55
+
}
56
+
57
+
if (null !== $this->propertyPath && !class_exists(PropertyAccess::class)) {
58
+
thrownewLogicException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "propertyPath" option.', static::class));
0 commit comments