Skip to content
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

PHPCompatibility should check for PHP 8.3 and 8.4 compatibility #491

Open
hostep opened this issue Mar 5, 2025 · 2 comments
Open

PHPCompatibility should check for PHP 8.3 and 8.4 compatibility #491

hostep opened this issue Mar 5, 2025 · 2 comments
Labels
enhancement Improvements to existing rules

Comments

@hostep
Copy link
Contributor

hostep commented Mar 5, 2025

Description

We currently only check for PHP 8.1 and 8.2 compatibility, which is pretty outdated. Especially now that Magento 2.4.8 will be released soon and will only support PHP 8.3 and 8.4

Expected behavior

Detect potential problems with PHP 8.3 and 8.4 in code scanned with this tool

Benefits

Finding problems in Magento core codebase and pull requests before they are released, using static analysis.

Additional information

I see 2 problems:

  • The Magento fork https://github.com/magento/PHPCompatibilityFork is very outdated, I really don't know why we can't use the original tool: https://github.com/PHPCompatibility/PHPCompatibility (yes, it hasn't had a stable version for many years, but using dev-develop as composer requirement works very good in my experience)
  • We currently have the PHPCompatibility testVersion setup to only scan for PHP 8.1 and 8.2 versions, see:
    <config name="testVersion" value="8.1-8.2"/>

    Changing this line probably won't help as the first bullet point points out that the Magento fork of this ruleset is very outdated and probably doesn't contain many checks against PHP 8.3/8.4 in contrast to the upstream version
@hostep hostep added the enhancement Improvements to existing rules label Mar 5, 2025
Copy link

m2-assistant bot commented Mar 5, 2025

Hi @hostep. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

@fredden
Copy link
Member

fredden commented Mar 7, 2025

Related: #487

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing rules
Projects
None yet
Development

No branches or pull requests

2 participants