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

Raise Psalm level to 3 and add generics to ClassMetadata #159

Closed
wants to merge 13 commits into from
4 changes: 4 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,21 @@
</NullArgument>
<PossiblyNullReference>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe leave a comment to explain why those couldn't be fixed and had to be ignored? It will be helpful for future contributions

<errorLevel type="suppress">
<!-- ReflectionProperty::getType() can return null, but there is ReflectionProperty::hasType()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been fixed in Psalm recently:
vimeo/psalm#5258
Maybe Psalm can be upgraded?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is ReflectionProperty (instead of ReflectionParameter) I've created vimeo/psalm#5584 based on vimeo/psalm#5258, but after reading it again, IIUC, it won't work because ReflectionProperty is not immutable.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, my mistake then :)

check before -->
<file name="lib/Doctrine/Persistence/Reflection/TypedNoDefaultReflectionProperty.php"/>
</errorLevel>
</PossiblyNullReference>
<ArgumentTypeCoercion>
<errorLevel type="suppress">
<!-- On purpose to use a non existing class for tests -->
<referencedFunction name="RuntimeReflectionServiceTest::testGetParentClassesForAbsentClass"/>
<file name="tests/Doctrine/Tests/Persistence/Mapping/RuntimeReflectionServiceTest.php"/>
</errorLevel>
</ArgumentTypeCoercion>
<MoreSpecificReturnType>
<errorLevel type="suppress">
<!-- FileDriver::loadMappingFile() in tests could have a more specific return, but is not needed -->
<file name="tests/Doctrine/Tests/Persistence/Mapping/FileDriverTest.php"/>
</errorLevel>
</MoreSpecificReturnType>
Expand Down