Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
+14 -14
View File
@@ -73,7 +73,7 @@ abstract class Constraint
throw new InvalidArgumentException(sprintf(
'The error code "%s" does not exist for constraint of type "%s".',
$errorCode,
get_called_class()
\get_called_class()
));
}
@@ -116,15 +116,15 @@ abstract class Constraint
// The "groups" option is added to the object lazily
$knownOptions['groups'] = true;
if (is_array($options) && count($options) >= 1 && isset($options['value']) && !property_exists($this, 'value')) {
if (\is_array($options) && \count($options) >= 1 && isset($options['value']) && !property_exists($this, 'value')) {
$options[$this->getDefaultOption()] = $options['value'];
unset($options['value']);
}
if (is_array($options)) {
if (\is_array($options)) {
reset($options);
}
if (is_array($options) && count($options) > 0 && is_string(key($options))) {
if (\is_array($options) && \count($options) > 0 && \is_string(key($options))) {
foreach ($options as $option => $value) {
if (array_key_exists($option, $knownOptions)) {
$this->$option = $value;
@@ -133,12 +133,12 @@ abstract class Constraint
$invalidOptions[] = $option;
}
}
} elseif (null !== $options && !(is_array($options) && 0 === count($options))) {
} elseif (null !== $options && !(\is_array($options) && 0 === \count($options))) {
$option = $this->getDefaultOption();
if (null === $option) {
throw new ConstraintDefinitionException(
sprintf('No default option is configured for constraint %s', get_class($this))
sprintf('No default option is configured for constraint %s', \get_class($this))
);
}
@@ -150,16 +150,16 @@ abstract class Constraint
}
}
if (count($invalidOptions) > 0) {
if (\count($invalidOptions) > 0) {
throw new InvalidOptionsException(
sprintf('The options "%s" do not exist in constraint %s', implode('", "', $invalidOptions), get_class($this)),
sprintf('The options "%s" do not exist in constraint %s', implode('", "', $invalidOptions), \get_class($this)),
$invalidOptions
);
}
if (count($missingOptions) > 0) {
if (\count($missingOptions) > 0) {
throw new MissingOptionsException(
sprintf('The options "%s" must be set for constraint %s', implode('", "', array_keys($missingOptions)), get_class($this)),
sprintf('The options "%s" must be set for constraint %s', implode('", "', array_keys($missingOptions)), \get_class($this)),
array_keys($missingOptions)
);
}
@@ -185,7 +185,7 @@ abstract class Constraint
return;
}
throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, get_class($this)), array($option));
throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), array($option));
}
/**
@@ -211,7 +211,7 @@ abstract class Constraint
return $this->groups;
}
throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, get_class($this)), array($option));
throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), array($option));
}
/**
@@ -231,7 +231,7 @@ abstract class Constraint
*/
public function addImplicitGroupName($group)
{
if (in_array(self::DEFAULT_GROUP, $this->groups) && !in_array($group, $this->groups)) {
if (\in_array(self::DEFAULT_GROUP, $this->groups) && !\in_array($group, $this->groups)) {
$this->groups[] = $group;
}
}
@@ -274,7 +274,7 @@ abstract class Constraint
*/
public function validatedBy()
{
return get_class($this).'Validator';
return \get_class($this).'Validator';
}
/**