-
Notifications
You must be signed in to change notification settings - Fork 515
Fix PropertyExistsTypeSpecifyingExtension for union types #4153
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
base: 2.1.x
Are you sure you want to change the base?
Conversation
Looks like I need to remove something from the baseline, and probably rejig my empty string check to be later down. |
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.
hey,
thanks for the pull request. it looks mostly good already.
I see the following todos atm
- look at the PHPStan errors of the PHP8.x builds first (the PHP7.x errors are likely reported on the wrong line, as the source code is transformed for PHP7.x compat). Usually most of the PHP7.x errors go away after you fix the PHP8 ones.
- after you fixed all newly reported PHPStan errors, you can run
make phpstan-generate-baseline
to cleanup the "Ignored error pattern XXX" errors - run
make cs-fix
to fix the Lint / Coding Standard problems - run
make
locally to verify all sanity checks are green - some of the GitHub Action checks fail unrelated to this PR. to get an idea which, its oftentimes usefull to look at other recent PRs and see whether these report the same problems.
Thanks @staabm. I think most of the failing action checks are from other PRs, as you described? The exception to this is doctrine/orm (see action), in which I think we've found legitimate issues to report. I believe the simplest example of this is here, but they all follow this general pattern. |
These look good to me |
Thanks again! |
You might want to mark this PR as ready @liamduckett ? |
This pull request has been marked as ready for review. |
closes phpstan/phpstan#13304
@staabm it'd be great to take you up on any guidance - especially because this PR is so heavily based on your changes in #4150. Thanks!
I believe my changes allow narrowing based on an array of constant strings, unless:
I was trying to reason as to whether it'd make sense to try and narrow based on parts of the union (for example, if it contains an empty string, but also a non empty string?) but I think I'm out of brainpower for the day.