Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse association mapping array shape #10403

Merged
merged 1 commit into from
Jan 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/Doctrine/ORM/ORMInvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Doctrine\Deprecations\Deprecation;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use InvalidArgumentException;

use function array_map;
Expand All @@ -22,6 +23,8 @@

/**
* Contains exception messages for all invalid lifecycle state exceptions inside UnitOfWork
*
* @psalm-import-type AssociationMapping from ClassMetadataInfo
*/
class ORMInvalidArgumentException extends InvalidArgumentException
{
Expand Down Expand Up @@ -109,7 +112,7 @@ static function (array $newEntityWithAssociation): string {

/**
* @param object $entry
* @psalm-param array<string, string> $associationMapping
* @psalm-param AssociationMapping $associationMapping
*
* @return ORMInvalidArgumentException
*/
Expand Down Expand Up @@ -271,7 +274,7 @@ private static function objToStr($obj): string

/**
* @param object $entity
* @psalm-param array<string,string> $associationMapping
* @psalm-param AssociationMapping $associationMapping
*/
private static function newEntityFoundThroughRelationshipMessage(array $associationMapping, $entity): string
{
Expand Down