Skip to content

Commit cc314d0

Browse files
committed
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.
1 parent e6eef1a commit cc314d0

File tree

3 files changed

+0
-11
lines changed

3 files changed

+0
-11
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,6 @@ parameters:
170170
count: 2
171171
path: src/Mapping/ClassMetadataFactory.php
172172

173-
-
174-
message: "#^Method Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataInfo\\:\\:fullyQualifiedClassName\\(\\) should return class\\-string\\|null but returns string\\|null\\.$#"
175-
count: 1
176-
path: src/Mapping/ClassMetadataInfo.php
177-
178173
-
179174
message: "#^Method Doctrine\\\\ORM\\\\Mapping\\\\NamingStrategy\\:\\:joinColumnName\\(\\) invoked with 2 parameters, 1 required\\.$#"
180175
count: 2

psalm-baseline.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,6 @@
607607
<InvalidPropertyAssignmentValue>
608608
<code>$definition</code>
609609
<code><![CDATA[$this->sqlResultSetMappings]]></code>
610-
<code><![CDATA[$this->subClasses]]></code>
611610
</InvalidPropertyAssignmentValue>
612611
<InvalidReturnStatement>
613612
<code>$mapping</code>
@@ -618,16 +617,12 @@
618617
<code>getReflectionClass</code>
619618
</InvalidReturnType>
620619
<LessSpecificReturnStatement>
621-
<code>$className</code>
622-
<code>$className</code>
623620
<code>$columnNames</code>
624621
<code>$mapping</code>
625622
<code>$quotedColumnNames</code>
626-
<code><![CDATA[$this->namespace . '\\' . $className]]></code>
627623
</LessSpecificReturnStatement>
628624
<MoreSpecificReturnType>
629625
<code>FieldMapping</code>
630-
<code>class-string|null</code>
631626
<code><![CDATA[list<string>]]></code>
632627
<code><![CDATA[list<string>]]></code>
633628
</MoreSpecificReturnType>

src/Mapping/ClassMetadataInfo.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3707,7 +3707,6 @@ public function getAssociationsByTargetClass($targetClass)
37073707
* @param string|null $className
37083708
*
37093709
* @return string|null null if the input value is null
3710-
* @psalm-return class-string|null
37113710
*/
37123711
public function fullyQualifiedClassName($className)
37133712
{

0 commit comments

Comments
 (0)