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
+11 -16
View File
@@ -47,7 +47,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface
public $defaultGroup;
/**
* @var MemberMetadata[]
* @var MemberMetadata[][]
*
* @internal This property is public in order to reduce the size of the
* class' serialized representation. Do not access it. Use
@@ -109,12 +109,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface
*/
private $reflClass;
/**
* Constructs a metadata for the given class.
*
* @param string $class
*/
public function __construct($class)
public function __construct(string $class)
{
$this->name = $class;
// class name without namespace
@@ -179,17 +174,17 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface
*/
public function addConstraint(Constraint $constraint)
{
if (!in_array(Constraint::CLASS_CONSTRAINT, (array) $constraint->getTargets())) {
if (!\in_array(Constraint::CLASS_CONSTRAINT, (array) $constraint->getTargets())) {
throw new ConstraintDefinitionException(sprintf(
'The constraint "%s" cannot be put on classes.',
get_class($constraint)
\get_class($constraint)
));
}
if ($constraint instanceof Valid) {
throw new ConstraintDefinitionException(sprintf(
'The constraint "%s" cannot be put on classes.',
get_class($constraint)
\get_class($constraint)
));
}
@@ -335,7 +330,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface
/**
* Merges the constraints of the given metadata into this object.
*/
public function mergeConstraints(ClassMetadata $source)
public function mergeConstraints(self $source)
{
if ($source->isGroupSequenceProvider()) {
$this->setGroupSequenceProvider(true);
@@ -350,7 +345,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface
$member = clone $member;
foreach ($member->getConstraints() as $constraint) {
if (in_array($constraint::DEFAULT_GROUP, $constraint->groups, true)) {
if (\in_array($constraint::DEFAULT_GROUP, $constraint->groups, true)) {
$member->constraintsByGroup[$this->getDefaultGroup()][] = $constraint;
}
@@ -415,15 +410,15 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface
throw new GroupDefinitionException('Defining a static group sequence is not allowed with a group sequence provider');
}
if (is_array($groupSequence)) {
if (\is_array($groupSequence)) {
$groupSequence = new GroupSequence($groupSequence);
}
if (in_array(Constraint::DEFAULT_GROUP, $groupSequence->groups, true)) {
if (\in_array(Constraint::DEFAULT_GROUP, $groupSequence->groups, true)) {
throw new GroupDefinitionException(sprintf('The group "%s" is not allowed in group sequences', Constraint::DEFAULT_GROUP));
}
if (!in_array($this->getDefaultGroup(), $groupSequence->groups, true)) {
if (!\in_array($this->getDefaultGroup(), $groupSequence->groups, true)) {
throw new GroupDefinitionException(sprintf('The group "%s" is missing in the group sequence', $this->getDefaultGroup()));
}
@@ -437,7 +432,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface
*/
public function hasGroupSequence()
{
return $this->groupSequence && count($this->groupSequence->groups) > 0;
return $this->groupSequence && \count($this->groupSequence->groups) > 0;
}
/**