-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Raise the PHP version requirement to >= 7.1 #27
Comments
I planned to introduce brraking changes in 3.0.0, for some time now, the implementation is on its way, so maybe that's where we could drop support for PHP 7.0. For now, can we use a Little older versions of PhpStan? |
Not if we want to have the baseline in order to work on the issues one-by-one while preventing new issues from getting in. (Without the baseline file, the PHPStan checks currently will not pass even at the lowest PHPStan level.) |
We could also keep PHPStan in a separate branch (that then requires PHP >= 7.1) and still use the baseline, and then merge it later into master when PHP >= 7.1 is a requirement. This would result in us not checking PRs for whether they introduce new typing issues in the meantime, though. |
I'm not sure. Seems like a lot of work, a lot of complication and a lot of additional details to keep in my, for seamingly not-so-necessary feature. Are you sure it's worth it? |
With "not-so-necessary feature", are you referring to using PHPStan at all, using PHPStan in the CI pipeline, or to the baseline feature? |
And what would be a lot of work? |
@oliverklee Correct me if I'm wrong; but aren't we doing that to make sure that all of the files have And to keep a separate branch with PhpStan run on PHP 7.1, then apply fixed based on that into the Seems like that can be done on a fork. One can change PHP 7.0 to 7.1 on his fork, install phpstan there, and use that fork to find errors, then apply fixes via pull requests. And only merge the final fork, when PHP7.0 is in fact dropped. |
I can't really help you with the implementation, since I'm working on an idea suggested here: MyIntervals/emogrifier#1000 (comment) |
@danon I think you are missing up things a bit here. 😄 I'll do my best to clear things up now. First, concerning the tools: Then there are several changes:
Does this explanation clear things up for you a bit? |
Yes, it does. So I understand there are two operations going on. First operation is to make files strict, and second operation is to make files PHP-12 compliant, is that correct? |
Exactly. And once each operation is finished, we can enforce that corresponding change is kept with a PHP_CodeSniffer rule(set). |
Note to myself: When planning this kind of multi-PR change with a bigger plan behind it for open source projects, better start by creating tickets that explain this plan to the maintainer(s). :-) EDIT: Done: #31 |
@oliverklee I created two GithubProject:
Could you visit each and everyone of your issues and PRs, and add each of them to one of the projects? On your right-hand side, you will see "Projects" secition. Please add each issue to one of them: |
Thanks for the invitation! I think I'll need some more permissions - I still cannot edit the project association of my PRs. (Once I can do so, I'll be happy to help organize my contributions.) |
@oliverklee I've raised permissions for you. You now also have write access to You're free to push typos, small fixes and refactors; but other changes like linters, composer scipts, features etc. please do through pull requests (can be from branch in this repo, or in branch of your fork). |
Actually, I'd prefer to not push directly to |
I propose we also have a project for the PHPStan-related tasks. I can create it if you like. Which template did you use for the other two projects? |
Sure it's fine. Are there issues and pull requests who belong to both operations? Or |
I don't follow. I though the PhpStan was for the PSR-12 compliace operation? |
No, that was PHP_CodeSniffer (which I intend to use both for PSR-12 checks as well as for checking that all PHP files are declared as strict.) PHPStan is for detecting incorrect method calls, non-matching types, undefined variables etc. |
(But there probably are some code issues that both tools can find.) |
@oliverklee So there's acutally three operations? Third of which is using PhpStan as a semi-compile time method verification? If there' are really 3 operations, then I guess you should create a third project for that. I didn't use any template. I added columns |
Thanks, done: https://github.com/T-Regx/CrossDataProviders/projects/3 |
With the new approach in #24, we don't need to raise the PHP version requirements after all. Hence closing. |
@oliverklee Wait a minute, how are we going to enfoce PSR-12 compliance? Weren't we planning on enforcing that with PhpStan? Or was it with the other tool? |
|
To use the latest version of PHPStan, we'll need at least PHP 7.1 in order to be able to do a
composer install
.@danon Would it be okay for you if we raised the version requirement to PHP >= 7.1?
As this will be a kind-of-breaking change, this would warrant a new major release as the next release (i.e., 3.0.0). Maybe a bug-fix version release just before the change of the PHP requirements would make sense so that users with PHP 7.0 still can benefit from the cleanup that has happened since the last release.
@danon What do you think?
The text was updated successfully, but these errors were encountered: