mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Psalm annotation is missing allowed ENUM values #7089
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kevinpapst on GitHub (Dec 31, 2022).
Bug Report
Hey @derrabus, in your recent commit you added Psalm annotations:
99a37d864e/lib/Doctrine/ORM/Mapping/GeneratedValue.php (L18-L30)Problem:
TABLEandUUIDare missing from the psalm annotation, while they are allowed in the ENUM.My build is breaking, because I use
UUIDand phpstan now reports... I can send a PR, just want to make sure that this was not on purpose, was it?
@greg0ire commented on GitHub (Dec 31, 2022):
Both are deprecated IIRC. I'm not saying it was on purpose, but that might explain it. You might want to dig into the git history.
@derrabus commented on GitHub (Dec 31, 2022):
"recent" as in two months ago! 😅
I think the reason was that both missing strategies are deprecated and we didn't see a better way to make this issue bubble up in your static analysis.
TABLEdoesn't even have an implementation and theUUIDstrategy is being removed from DBAL, iirc.@kevinpapst commented on GitHub (Dec 31, 2022):
It was removed in 2018 ???
A bit odd: why does
#[ORM\GeneratedValue(strategy: 'UUID')]not trigger any runtime deprecation?Seems I have to say "Thank you 👍 " for reporting the deprecation in that rather unexpected way 😁
@derrabus commented on GitHub (Dec 31, 2022):
There should be a runtime deprecation as well I believe, haven't checked though.