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

Narrow ReflectionEnum::getBackingType after ReflectionEnum::isBacked #2753

Closed

Conversation

RobertMe
Copy link
Contributor

@phpstan-bot
Copy link
Collaborator

You've opened the pull request against the latest branch 1.11.x. If your code is relevant on 1.10.x and you want it to be released sooner, please rebase your pull request and change its target to 1.10.x.

@RobertMe
Copy link
Contributor Author

I'm guessing the tests could be "improved" (not sure whether it should be at root of the file, if it actually can be added in this same file).
Furthermore I "discovered" that the return type actually is dependent on the PHP version (PHP 8.2+ returns ReflectionNamedType|null while lower versions return ReflectionType|null) so that might require some fix/improvement too.

@RobertMe RobertMe closed this Dec 15, 2023
@RobertMe RobertMe deleted the narrow-ReflectionEnum-getBackingType branch December 15, 2023 15:01
@staabm
Copy link
Contributor

staabm commented Dec 16, 2023

Why did you close the PR?

@RobertMe
Copy link
Contributor Author

Why did you close the PR?

Because it's not finished (failing tests); I was unsure how to fix the 8.2+ vs 8.1 differences, also because of a lack of input (/"support"); I didn't even continue using the code which lead to this "issue" (so in the end I personally didn't even need it anymore, although I normally would finish PRs that I started, even when I wouldn't need them anymore);
And, to be honest, foremost because of how my more recent issue and accompanying PR were handled and I'm not even sure whether I like to continue using PHPStan, or whether to switch to Psalm (although I might regret that if Psalm doesn't validate and infer types from SQL queries 😉).

@staabm
Copy link
Contributor

staabm commented Dec 16, 2023

I see, thx. I will have a look at the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants