Skip to content

feat: PHP 8.4 compatibility support#8300

Merged
keradus merged 34 commits intoPHP-CS-Fixer:masterfrom
Wirone:codito/php8.4
Jul 6, 2025
Merged

feat: PHP 8.4 compatibility support#8300
keradus merged 34 commits intoPHP-CS-Fixer:masterfrom
Wirone:codito/php8.4

Conversation

@Wirone
Copy link
Copy Markdown
Member

@Wirone Wirone commented Nov 22, 2024

This is long-living PR that validates PHP 8.4 compatibility, its goal is determining issues with rules, so they can be addressed under this milestone. This can be merged after all related issues are resolved, which means tests/Fixtures/Integration/misc/PHP8_4.test covers close-to-all scenarios with 8.4 new syntax-related features and is green. I will add more in/out examples in integration test, and will rebase this periodically so we can keep track of the current state. I don't see better approach for now, as we can't merge test cases that fail (unless we move them to separate CI job).

Any help related to finding test cases that fail on 8.4 with current rules, and of course implementing fixes for such rules are more than welcome 🙂.

sub-PRs:

@Wirone Wirone added the topic/PHP8.4 Related to features available in PHP 8.4+ label Nov 22, 2024
@Wirone Wirone added this to the PHP 8.4 initial compatibility milestone Nov 22, 2024
@Wirone Wirone self-assigned this Nov 22, 2024
@coveralls
Copy link
Copy Markdown

coveralls commented Nov 22, 2024

Coverage Status

coverage: 94.802% (-0.03%) from 94.832%
when pulling 1f24782 on Wirone:codito/php8.4
into 2434369 on PHP-CS-Fixer:master.

@SpacePossum
Copy link
Copy Markdown
Contributor

SpacePossum commented Nov 23, 2024

Good idea!
I think an important thing might be is to see if introduction of new custom tokens for new 8.4 syntax is wanted. After the tool is released with 8.4 the tokens cannot be added as it would be a BC break (for example for custom/3rd party rules).
(For example #8301 could be fixed by introducing new custom tokens for the braces)

@Wirone Wirone force-pushed the codito/php8.4 branch 2 times, most recently from f019bbd to b1ed5a9 Compare November 25, 2024 09:58
@Jubeki Jubeki mentioned this pull request Nov 25, 2024
5 tasks
@Wirone Wirone changed the title feat: Support for PHP 8.4 feat: Initial support for PHP 8.4 Nov 25, 2024
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to consider add interface scenarios using property hooks?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a complete PR, it's WIP but I did not have time to continue work yet.

@keradus keradus changed the title feat: Initial support for PHP 8.4 feat: PHP 8.4 compatibility support Jul 6, 2025
@keradus keradus requested a review from Copilot July 6, 2025 18:26

This comment was marked as resolved.

@keradus
Copy link
Copy Markdown
Member

keradus commented Jul 6, 2025

Thank you @Wirone, @kubawerlos and others. Especially Kuba, crazy amount of work 🙇🏻

Massive work behind this and related PRs in this milestone.

@keradus keradus marked this pull request as ready for review July 6, 2025 20:47
@keradus keradus merged commit e9d1fe9 into PHP-CS-Fixer:master Jul 6, 2025
31 checks passed
@Wirone Wirone deleted the codito/php8.4 branch July 6, 2025 20:57
@Wirone
Copy link
Copy Markdown
Member Author

Wirone commented Jul 6, 2025

Thank you @kubawerlos and @keradus for continuing this 🍻 ❤️! I am sorry that I couldn't help you as much as I would have wanted, but the best thing here is we finally did it as a team 😎.

@potsky
Copy link
Copy Markdown

potsky commented Jul 7, 2025

👏

@skjnldsv
Copy link
Copy Markdown

skjnldsv commented Jul 7, 2025

🚀 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic/PHP8.4 Related to features available in PHP 8.4+

Projects

None yet

Development

Successfully merging this pull request may close these issues.