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
PHP8.1 support #6152
PHP8.1 support #6152
Conversation
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.
Since php-cs-fixer
declares ^8.0
as composer.json
supported version:
Then crashes at runtime (message changed in this patch):
PHP needs to be a minimum version of PHP 7.2.5 and maximum version of PHP 8.0.*.
I'd say that changing composer.json
to restrict to "php": "^7.2.5 || ~8.0.0 || ~8.1.0"
is a required addition to this patch: as it currently stands, the fact that the tool installs cleanly, then fails at a later point in time, is not really useful.
@Ocramius we had tons of ppl crying that they cannot update their project to use new PHP because PHP CS Fixer is not yet compatible. EVERY SINGLE TIME new PHP is out. Same time, not so many ppl are eager to help making PHP CS Fixer understanding new PHP syntax or be compatible with modified tokenizer. |
I tell them to wait: having a tool that you install (then crashes at startup) is really no better, and it just gives false confidence (and introduces instability in the overall ecosystem). The fact that dependency ranges don't match actual compatibility is mostly something that some communities have erroneously started advocating for, because solving the compatibility is less important than having users upgrade (and experience instability) 🤷 See also https://github.com/laminas/technical-steering-committee/blob/c7f6babfb1773d9cb9371208102cbb8b27980bd5/meetings/minutes/2021-08-02-TSC-Minutes.md#locked-dependencies-for-all-supported-php-versions for more context, previously discussed by the @laminas TSC. In practice, for my own packages:
|
Unfortunately, while we were following the approach you described, we faced many issues/complaints. Anyway, feel free to open a new discussion, as this is not the blocker for this PR (as we have a current practice in place for a year) and I would prefer to not hijack this thread but focus on 8.1 here. unfortunate noteI also spent quite a time discussing all pros and cons about having ~8.0 vs ^8 vs >=8. TBH, I rather prefer to spend time ensuring PHP8.x compatibility rather than spending time in a discussion that year ago started to be similar to tabs vs spaces. |
Waiting on this. Guess we'll have to disable PHP-CS-Fixer for now. |
My project is also held up too, I'd love to help/contribute but unsure where to start on the repo |
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.
@SpacePossum finally the check finished, nothing related to PHP 8.1, only stuff that are already released (PR with fix in progress).
EDIT: this one.
Thanks so much @kubawerlos 👍 I think that is it, all feedback processed. If the tests are green I plan on merging. If anyone sees some related issue still open please comment :) |
kudos for executing the regression, @kubawerlos ! |
…e directives (kubawerlos) This PR was squashed before being merged into the master branch (closes #6165). Discussion ---------- DeclareEqualNormalizeFixer - fix for declare having multiple directives One more edgy edge case found running [regression](#6152 (comment)). Commits ------- 03f5eff DeclareEqualNormalizeFixer - fix for declare having multiple directives
Sorry if I am not understanding this correctly, but it seems all issues to support php 8.1 are done but composer.json still does not allow 8.1. |
@iwiznia |
Oh 🤦 my bad... I realize now that I was getting that error because platform was overriden in the composer.json file. Thanks @Ocramius!! |
@kubawerlos do you maybe have time to run the tests with the top X PHP projects to see if there is regression we overlooked?