From cc314d0fb7bfcfcf026ee197293e037a24e2b646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Thu, 22 Feb 2024 23:08:53 +0100 Subject: [PATCH] Remove wrong annotation about return type Although this method is guaranteed to return either null or something that can be used as a fully qualified class name, it never actually checks that the class actually exists. Adding such a check breaks several tests, including some that expect a exceptions at some later points in the execution. --- phpstan-baseline.neon | 5 ----- psalm-baseline.xml | 5 ----- src/Mapping/ClassMetadataInfo.php | 1 - 3 files changed, 11 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e824e0ad896..e288862b309 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -170,11 +170,6 @@ parameters: count: 2 path: src/Mapping/ClassMetadataFactory.php - - - message: "#^Method Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataInfo\\:\\:fullyQualifiedClassName\\(\\) should return class\\-string\\|null but returns string\\|null\\.$#" - count: 1 - path: src/Mapping/ClassMetadataInfo.php - - message: "#^Method Doctrine\\\\ORM\\\\Mapping\\\\NamingStrategy\\:\\:joinColumnName\\(\\) invoked with 2 parameters, 1 required\\.$#" count: 2 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 3123bf33d28..b41991b5210 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -607,7 +607,6 @@ $definition sqlResultSetMappings]]> - subClasses]]> $mapping @@ -618,16 +617,12 @@ getReflectionClass - $className - $className $columnNames $mapping $quotedColumnNames - namespace . '\\' . $className]]> FieldMapping - class-string|null ]]> ]]> diff --git a/src/Mapping/ClassMetadataInfo.php b/src/Mapping/ClassMetadataInfo.php index 9553d84e7a2..3e373a0956d 100644 --- a/src/Mapping/ClassMetadataInfo.php +++ b/src/Mapping/ClassMetadataInfo.php @@ -3707,7 +3707,6 @@ public function getAssociationsByTargetClass($targetClass) * @param string|null $className * * @return string|null null if the input value is null - * @psalm-return class-string|null */ public function fullyQualifiedClassName($className) {