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
feat: support PHPUnit v9.1 naming for some asserts #7997
base: master
Are you sure you want to change the base?
feat: support PHPUnit v9.1 naming for some asserts #7997
Conversation
I don't know how to mark it as draft so I closed it, will reopen when done |
@krzysztof-ciszewski I've converted it to a draft, so feel free to push changes and verify with the full CI 🙂. |
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.
That union with simple array
(without shape) causes PHPStan errors.
@Wirone can you remove the draft now? The pipeline is green 🍾 |
@krzysztof-ciszewski no problem 🙂. FYI, for future contributions: There is also possibility to create PR as draft (dedicated button on PR form). |
if ('assertnotisreadable' === $assertCall['loweredName']) { | ||
$replacement = 'assertIsNotReadable'; | ||
} elseif ('assertnotiswritable' === $assertCall['loweredName']) { | ||
$replacement = 'assertIsNotWritable'; | ||
} elseif ('assertdirectorynotexists' === $assertCall['loweredName']) { | ||
$replacement = 'assertDirectoryDoesNotExist'; | ||
} elseif ('assertfilenotexists' === $assertCall['loweredName']) { | ||
$replacement = 'assertFileDoesNotExist'; | ||
} |
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.
Strange that mess-detector prefers this over switch statement, not everything can be refactored to polymorphism, especially string comparison.
bump |
Fixes #7968
I assumed$fixMap
is static for performance so I tried my best to keep it like that.Could not keep fixmap static, I don't know if it has impact on performace, not sure how to use benchmark