foreach ($options as $name =>
$value) { $this->
$name =
$value;
} } protected function normalizeOptions(mixed
$options): array
{ $normalizedOptions =
[];
$defaultOption =
$this->
getDefaultOption();
$invalidOptions =
[];
$missingOptions =
array_flip((array) $this->
getRequiredOptions());
$knownOptions =
get_class_vars(static::
class);
if (\
is_array($options) &&
isset($options['value'
]) && !
property_exists($this, 'value'
)) { if (null ===
$defaultOption) { throw new ConstraintDefinitionException(sprintf('No default option is configured for constraint "%s".',
static::
class));
} $options[$defaultOption] =
$options['value'
];
unset($options['value'
]);
}