doctrine / orm

Doctrine Object Relational Mapper (ORM)
https://www.doctrine-project.org/projects/orm.html
MIT License
9.92k stars 2.51k forks source link

Resolve LSP violation #11520

Open greg0ire opened 3 months ago

greg0ire commented 3 months ago

This was necessary to support usage of static reflection, which is gone with ORM 3.

greg0ire commented 3 months ago

@stof Psalm now rightfully complains about this line: https://github.com/doctrine/orm/blob/1153b9468ccfef452625064c66b4a135d0ea8a46/src/Mapping/ClassMetadata.php#L785

What should I do?

More broadly, is https://github.com/doctrine/persistence/blob/3.3.x/src/Persistence/Mapping/StaticReflectionService.php still needed? Should null be removed from the return type of https://github.com/doctrine/persistence/blob/b337726451f5d530df338fc7f68dee8781b49779/src/Persistence/Mapping/ReflectionService.php#L51-L56 ?

greg0ire commented 3 months ago

Related to https://github.com/doctrine/persistence/pull/379