Skip to content

[Issue] Remove legacy compatibility code for PHP versions < 8.1 #39891

Open
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #39882: Remove legacy compatibility code for PHP versions < 8.1


Description (*)

This pull request removes code that was designed to be ran on PHP <8.1.
Also, removed checks for PHP_VERSION_ID contact availability, since it's available in all PHP versions

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
    All commits are accompanied by meaningful commit messages
    All new or changed code is covered with unit/integration tests (if applicable)
    README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
    All automated tests passed successfully (all builds are green)

Activity

added
Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Reported on 2.4.xIndicates original Magento version for the Issue report.
Priority: P3May be fixed according to the position in the backlog.
on May 6, 2025
engcom-Dash

engcom-Dash commented on Jun 18, 2025

@engcom-Dash
Contributor

@ihor-sviziev Thank you for the report & collaboration!

Looking at the PR changes we can confirm that for PHP version < 8.0.0 legacy code can be removed. PHP_VERSION_ID is available in all the PHP versions hence we can safely remove the checks for it. Also, T_NAME_QUALIFIED & T_NAME_FULLY_QUALIFIED are available in versions starting from 8.0.0.

Hence confirming the issue.

github-jira-sync-bot

github-jira-sync-bot commented on Jun 18, 2025

@github-jira-sync-bot

✅ Jira issue https://jira.corp.adobe.com/browse/AC-14971 is successfully created for this GitHub issue.

m2-assistant

m2-assistant commented on Jun 18, 2025

@m2-assistant
Author

✅ Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: FrameworkComponent: Framework/AppComponent: Framework/DBUSE ONLY for FRAMEWORK RELATED BUG!Component: Framework/TestFrameworkIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Reported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    Status

    Ready for Development

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @engcom-Bravo@engcom-Dash@github-jira-sync-bot

      Issue actions

        [Issue] Remove legacy compatibility code for PHP versions < 8.1 · Issue #39891 · magento/magento2