Skip to content

2.0.x UnitOfWork return array shape #1520

2.0.x UnitOfWork return array shape

2.0.x UnitOfWork return array shape #1520

Triggered via pull request October 17, 2025 11:39
Status Failure
Total duration 1m 41s
Artifacts

build.yml

on: pull_request
Matrix: PHPStan
Matrix: Tests
Coding Standard
19s
Coding Standard
Matrix: Lint
Matrix: Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

70 errors
PHPStan (8.2): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L94
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (8.2): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L80
Method PHPStan\Type\Doctrine\UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension::createOriginalEntityDataType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.2): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.2): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (8.2): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L118
Call to function is_string() with class-string will always evaluate to true.
PHPStan (8.2): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L117
Offset 'targetEntity' on array{cache?: array<mixed>, cascade: array<string>, declared?: class-string, fetch: mixed, fieldName: string, id?: bool, inherited?: class-string, indexBy?: string, ...} on left side of ?? always exists and is not nullable.
PHPStan (8.2): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L91
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (8.2): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L81
Method PHPStan\Type\Doctrine\UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension::createChangeSetType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.2): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.2): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (8.0): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L94
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (8.0): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L80
Method PHPStan\Type\Doctrine\UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension::createOriginalEntityDataType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.0): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.0): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (8.0): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L118
Call to function is_string() with class-string will always evaluate to true.
PHPStan (8.0): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L117
Offset 'targetEntity' on array{cache?: array<mixed>, cascade: array<string>, declared?: class-string, fetch: mixed, fieldName: string, id?: bool, inherited?: class-string, indexBy?: string, ...} on left side of ?? always exists and is not nullable.
PHPStan (8.0): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L91
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (8.0): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L81
Method PHPStan\Type\Doctrine\UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension::createChangeSetType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.0): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.0): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (8.3): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L94
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (8.3): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L80
Method PHPStan\Type\Doctrine\UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension::createOriginalEntityDataType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.3): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.3): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (8.3): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L118
Call to function is_string() with class-string will always evaluate to true.
PHPStan (8.3): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L117
Offset 'targetEntity' on array{cache?: array<mixed>, cascade: array<string>, declared?: class-string, fetch: mixed, fieldName: string, id?: bool, inherited?: class-string, indexBy?: string, ...} on left side of ?? always exists and is not nullable.
PHPStan (8.3): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L91
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (8.3): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L81
Method PHPStan\Type\Doctrine\UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension::createChangeSetType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.3): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.3): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (7.4): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L94
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (7.4): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L80
Method PHPStan\Type\Doctrine\UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension::createOriginalEntityDataType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (7.4): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (7.4): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (7.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L118
Call to function is_string() with class-string will always evaluate to true.
PHPStan (7.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L117
Offset 'targetEntity' on array{cache?: array<mixed>, cascade: array<string>, declared?: class-string, fetch: mixed, fieldName: string, id?: bool, inherited?: class-string, indexBy?: string, ...} on left side of ?? always exists and is not nullable.
PHPStan (7.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L91
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (7.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L81
Method PHPStan\Type\Doctrine\UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension::createChangeSetType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (7.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (7.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (8.4): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L94
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (8.4): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L80
Method PHPStan\Type\Doctrine\UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension::createOriginalEntityDataType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.4): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.4): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (8.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L118
Call to function is_string() with class-string will always evaluate to true.
PHPStan (8.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L117
Offset 'targetEntity' on array{cache?: array<mixed>, cascade: array<string>, declared?: class-string, fetch: mixed, fieldName: string, id?: bool, inherited?: class-string, indexBy?: string, ...} on left side of ?? always exists and is not nullable.
PHPStan (8.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L91
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (8.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L81
Method PHPStan\Type\Doctrine\UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension::createChangeSetType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.4): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (8.1): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L94
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (8.3, composer require --dev doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctri...: src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L122
Parameter #1 $association of method PHPStan\Type\Doctrine\UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension::isAssociationNullable() expects array<string, mixed>, Doctrine\ORM\Mapping\ManyToManyInverseSideMapping|Doctrine\ORM\Mapping\ManyToManyOwningSideMapping|Doctrine\ORM\Mapping\ManyToOneAssociationMapping|Doctrine\ORM\Mapping\OneToManyAssociationMapping|Doctrine\ORM\Mapping\OneToOneInverseSideMapping|Doctrine\ORM\Mapping\OneToOneOwningSideMapping given.
PHPStan (8.1): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L80
Method PHPStan\Type\Doctrine\UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension::createOriginalEntityDataType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.3, composer require --dev doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctri...: src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L80
Method PHPStan\Type\Doctrine\UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension::createOriginalEntityDataType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.1): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.3, composer require --dev doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctri...: src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.3, composer require --dev doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctri...: src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (8.1): src/Type/Doctrine/UnitOfWorkGetOriginalEntityDataDynamicReturnTypeExtension.php#L69
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (8.3, composer require --dev doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctri...: src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L123
Parameter #1 $association of method PHPStan\Type\Doctrine\UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension::isAssociationNullable() expects array<string, mixed>, Doctrine\ORM\Mapping\ManyToManyInverseSideMapping|Doctrine\ORM\Mapping\ManyToManyOwningSideMapping|Doctrine\ORM\Mapping\ManyToOneAssociationMapping|Doctrine\ORM\Mapping\OneToManyAssociationMapping|Doctrine\ORM\Mapping\OneToOneInverseSideMapping|Doctrine\ORM\Mapping\OneToOneOwningSideMapping given.
PHPStan (8.1): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L118
Call to function is_string() with class-string will always evaluate to true.
PHPStan (8.3, composer require --dev doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctri...: src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L81
Method PHPStan\Type\Doctrine\UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension::createChangeSetType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.1): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L117
Offset 'targetEntity' on array{cache?: array<mixed>, cascade: array<string>, declared?: class-string, fetch: mixed, fieldName: string, id?: bool, inherited?: class-string, indexBy?: string, ...} on left side of ?? always exists and is not nullable.
PHPStan (8.3, composer require --dev doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctri...: src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.1): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L91
Offset 'type' on array{type: string, fieldName: string, columnName: string, length?: int, id?: bool, nullable?: bool, notInsertable?: bool, notUpdatable?: bool, ...} in isset() always exists and is not nullable.
PHPStan (8.3, composer require --dev doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctri...: src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.
PHPStan (8.1): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L81
Method PHPStan\Type\Doctrine\UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension::createChangeSetType() has parameter $metadata with generic class Doctrine\ORM\Mapping\ClassMetadata but does not specify its types: T
PHPStan (8.1): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Unable to resolve the template type T in call to method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata()
PHPStan (8.1): src/Type/Doctrine/UnitOfWorkGetEntityChangeSetDynamicReturnTypeExtension.php#L70
Parameter #1 $className of method PHPStan\Type\Doctrine\ObjectMetadataResolver::getClassMetadata() expects class-string<object>, string given.