-
Notifications
You must be signed in to change notification settings - Fork 548
Implement getConstantStrings() on Type #1979
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
Conversation
|
This pull request has been marked as ready for review. |
4b9b059 to
c11ef4b
Compare
86ed04f to
e387570
Compare
e387570 to
144304c
Compare
21de8f4 to
fac73f6
Compare
fac73f6 to
4576fa6
Compare
|
This pull request has been marked as ready for review. |
e75f596 to
6ba53ee
Compare
fe1030d to
50c106c
Compare
50c106c to
3de226d
Compare
|
Thank you! |
| /** | ||
| * @return ConstantStringType[] | ||
| * | ||
| * @deprecated Use PHPStan\Type\Type::getConstantStrings() instead |
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.
@staabm The two methods don't work exactly the same (i.e. the new implementation for UnionType doesn't have $stopOnUnmatched equivalent). I think it causes a regression here: https://phpstan.org/r/33df1d6b-50e1-4aed-ac3b-bb5f1a8ac66b (constant string concat with int|null - the result shouldn't be a constant 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.
thx for the headsup. I will have a look.
I opened a issue for it: phpstan/phpstan#8568
refs phpstan/phpstan#8311