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
thrownewConstraintDefinitionException(sprintf('No default option is configured for constraint %s', \get_class($this)));
138
+
if (null === $defaultOption) {
139
+
thrownewConstraintDefinitionException(sprintf('No default option is configured for constraint "%s".', \get_class($this)));
137
140
}
138
141
139
-
if (\array_key_exists($option, $knownOptions)) {
140
-
$this->$option = $options;
141
-
unset($missingOptions[$option]);
142
+
if (\array_key_exists($defaultOption, $knownOptions)) {
143
+
$this->$defaultOption = $options;
144
+
unset($missingOptions[$defaultOption]);
142
145
} else {
143
-
$invalidOptions[] = $option;
146
+
$invalidOptions[] = $defaultOption;
144
147
}
145
148
}
146
149
147
150
if (\count($invalidOptions) > 0) {
148
-
thrownewInvalidOptionsException(sprintf('The options "%s" do not exist in constraint %s', implode('", "', $invalidOptions), \get_class($this)), $invalidOptions);
151
+
thrownewInvalidOptionsException(sprintf('The options "%s" do not exist in constraint "%s".', implode('", "', $invalidOptions), \get_class($this)), $invalidOptions);
149
152
}
150
153
151
154
if (\count($missingOptions) > 0) {
152
-
thrownewMissingOptionsException(sprintf('The options "%s" must be set for constraint %s', implode('", "', array_keys($missingOptions)), \get_class($this)), array_keys($missingOptions));
155
+
thrownewMissingOptionsException(sprintf('The options "%s" must be set for constraint "%s".', implode('", "', array_keys($missingOptions)), \get_class($this)), array_keys($missingOptions));
153
156
}
154
157
}
155
158
@@ -173,7 +176,7 @@ public function __set($option, $value)
173
176
return;
174
177
}
175
178
176
-
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), [$option]);
179
+
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, \get_class($this)), [$option]);
177
180
}
178
181
179
182
/**
@@ -199,7 +202,7 @@ public function __get($option)
199
202
return$this->groups;
200
203
}
201
204
202
-
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), [$option]);
205
+
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, \get_class($this)), [$option]);
0 commit comments