-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add missing proxy methods #348
Conversation
fc59bb6
to
79ba7c6
Compare
@@ -10,6 +10,16 @@ parameters: | |||
count: 1 | |||
path: src/Persistence/Reflection/EnumReflectionProperty.php | |||
|
|||
- | |||
message: "#^Method Doctrine\\\\Persistence\\\\Reflection\\\\EnumReflectionProperty\\:\\:getDeclaringClass\\(\\) return type with generic class ReflectionClass does not specify its types\\: T$#" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be solved by making EnumReflectionProperty generic on the class name, as done in the stubs for ReflectionProperty in Psalm and phpstan instead of adding it in the baseline IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but I'm not sure how I can make the type flow from the constructor to there 🤔 I think I'm supposed to leverage ReflectionProperty
's template types, if there are some, but I don't know where to find their definitions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, apparently, Psalm makes ReflectionProperty generic but phpstan does not. So I'm not sure solving this one is actually possible.
79ba7c6
to
f9f9dcf
Compare
} | ||
|
||
/** {@inheritDoc} */ | ||
public function getName(): string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should be adding the @psalm-immutable
annotation (which is not the same than @psalm-pure
that you tried)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it locally, to no avail, then noticed I still had Psalm 4, apparently because Psalm 5 is not compatible with php 8.3 yet, so I just tried pushing, and it doesn't work with Psalm 5 either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just @psalm-external-mutation-free
seems sufficient.
139c0e0
to
6f0e8b8
Compare
I somehow thought I had a green build for the ORM after e70bc39, but I really didn't.
6f0e8b8
to
5bed91c
Compare
I somehow thought I had a green build for the ORM after #343, but I really didn't.
Picked the patch release since it's something I forgot and the release is fresh, but please do tell if you think I should be strict about this and target 3.4.x instead.