-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
CI: Introduce PHP compatibility check #7844
Conversation
787f171
to
ad6eaf7
Compare
ad6eaf7
to
9cdb005
Compare
Please don't cc me on other repositories. If you want, you can isolate the bug, reproduce it and report it properly on PHPStan's issue tracker. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
# Conflicts: # .gitignore # composer.json # dev-tools/composer.json # dev-tools/composer.lock # tests/AutoReview/CiConfigurationTest.php
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.
@keradus it's maintained, but not 9.x 🙂. Please see the PS in PR's description. For wider context you can look at my Twitter thread, it sparked PHPCompatibility/PHPCompatibility#1480 which then was implemented in PHPCompatibility/PHPCompatibility#1730. So yeah, this is actively developed (last commit month ago, maybe holidays 😉). |
last release 5 years ago sounds to me like not maintained fully. I understand there is ongoing development to make 10.x, but it's never officially release for last 5 years. At least 10.0-alpha.1 or sth..., just dev-master isn't best versioning/release cycle |
thank you @Wirone |
@jrfnl did you consider tagging a |
I aksed them in their repo earlier - PHPCompatibility/PHPCompatibility#1312 (comment) . I know for lot of ppl monitoring questions in each repo is not manageable and they focus on their repos for communication. |
@keradus *her 😉. And from my experience she does not have a problem with mentioning outside of PHPCompatibility org. |
Inspired by this finding, bug introduced in #7616, reproduced here - we have invalid return type in code and none of the tools caught this. I thought this is because we run PHPStan on 8.3 which then assumes it's valid return type, but I modified
dev-tools/composer.json
, allowed PHP 7.4 and checked on it, but PHPStan still did not report it, even onmax
level. I believe this is a bug (CC: @ondrejmirtes), but anyway I thought maybe it's a good idea to introduce PHPCompatibility check, which is more focused on differences between PHP versions.This is a draft and CI will fail, because we need to decide how we want to handle dynamic usages of PHP consts etc. I believe that sniffs should not report these problems if constant is used in
if
condition, like:but this is separate problem that should be addressed and fixed in long-term (CC: @jrfnl).
PS. There is
10.x-dev as 9.99.0
constraint because10.x
development version has more checks, but at the same time is not compatible withphpcompatibility/phpcompatibility-symfony
which handles Symfony polyfills. We've been using this setup for months in GetResponse and it helped us with migration from 7.4 to 8.2, so I assume it as safe enough 🙂.