Skip to content

Upgrade minimum PHP version to 7.4#3419

Merged
acicovic merged 2 commits intodevelopfrom
update/minimum-php-version-to-7-4
Jun 9, 2025
Merged

Upgrade minimum PHP version to 7.4#3419
acicovic merged 2 commits intodevelopfrom
update/minimum-php-version-to-7-4

Conversation

@acicovic
Copy link
Collaborator

@acicovic acicovic commented Jun 4, 2025

Description

With this PR, we're upgrading the required minimum PHP version to v7.4.

Motivation and context

How has this been tested?

Automated testing passes. Tests against PHP 7.2/7.3 are expected to stall/fail.

Summary by CodeRabbit

  • Chores
    • Updated the minimum required PHP version to 7.4 in documentation, plugin metadata, and configuration files.
    • Adjusted automated test workflows to remove support for PHP 7.2 and 7.3.
    • Updated code analysis tools to check compatibility with PHP 7.4 and above.

@acicovic acicovic added this to the 3.20.0 milestone Jun 4, 2025
@acicovic acicovic self-assigned this Jun 4, 2025
@acicovic acicovic added the Maintenance & Fixes Ticket/PR related to codebase maintenance tasks label Jun 4, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 4, 2025

📝 Walkthrough

Walkthrough

The minimum supported PHP version for the project has been increased from 7.2 to 7.4. This change is reflected across documentation, configuration files, Composer requirements, static analysis rules, and GitHub Actions workflows for both integration and unit tests, with older PHP versions removed from test matrices.

Changes

Files/Paths Change Summary
.github/workflows/integration-tests.yml,
.github/workflows/unit-tests.yml
Removed PHP 7.2 and 7.3 from test matrices; removed conditional MySQL step for <=7.3.
.phpcs.xml.dist Updated PHPCompatibilityWP sniff to require PHP 7.4+.
README.md Updated minimum required PHP version from 7.2 to 7.4.
composer.json Changed PHP version requirement from ">=7.2" to ">=7.4".
wp-parsely.php Updated plugin header to require PHP 7.4 minimum.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant CI Workflow
    participant Composer
    participant StaticAnalyzer

    Developer->>README.md: Update PHP min version to 7.4
    Developer->>composer.json: Set PHP requirement to >=7.4
    Developer->>wp-parsely.php: Update plugin header to 7.4
    Developer->>CI Workflow: Remove PHP 7.2/7.3 from test matrix
    Developer->>StaticAnalyzer: Set PHPCompatibilityWP to 7.4
    CI Workflow->>Composer: Install dependencies (PHP >=7.4)
    CI Workflow->>StaticAnalyzer: Run compatibility checks (PHP 7.4+)
Loading

Assessment against linked issues

Objective (Issue #) Addressed Explanation
Upgrade minimum PHP version to 7.4 (#3418)

Possibly related PRs

Suggested reviewers

  • alecgeatches

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 14dd609 and 2f9824e.

📒 Files selected for processing (6)
  • .github/workflows/integration-tests.yml (1 hunks)
  • .github/workflows/unit-tests.yml (1 hunks)
  • .phpcs.xml.dist (1 hunks)
  • README.md (1 hunks)
  • composer.json (1 hunks)
  • wp-parsely.php (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{html,php}`: "Perform a detailed review of the provided code with following key aspects in mind: - Review the HTML and PHP code to ensure it is well-structured and adheres ...

**/*.{html,php}: "Perform a detailed review of the provided code with following key aspects in mind:

  • Review the HTML and PHP code to ensure it is well-structured and adheres to best practices.
  • Ensure the code follows WordPress coding standards and is well-documented.
  • Confirm the code is secure and free from vulnerabilities.
  • Optimize the code for performance, removing any unnecessary elements.
  • Validate comments for accuracy, currency, and adherence to WordPress coding standards.
  • Ensure each line comment concludes with a period.
  • Verify code compatibility with the latest version of WordPress, avoiding deprecated functions or features."
  • wp-parsely.php
🔇 Additional comments (7)
README.md (1)

6-6: README updated to require PHP 7.4.
The “Requires PHP: 7.4” directive aligns with the new project baseline and follows WordPress readme standards.

wp-parsely.php (1)

21-21: Plugin header Requires PHP bumped to 7.4.
This matches the updated composer requirement and CI matrices.

composer.json (1)

15-15: composer.json php version constraint updated to >=7.4.
Aligned with the new minimum PHP baseline across the project.

.github/workflows/unit-tests.yml (1)

33-33: Unit tests matrix now starts at PHP 7.4.
PHP 7.2 and 7.3 have been removed and tests correctly run on 7.4+.

.phpcs.xml.dist (1)

35-35: PHPCompatibilityWP testVersion set to 7.4-.
Static analysis will now enforce compatibility for PHP 7.4 and above.

.github/workflows/integration-tests.yml (2)

32-32: Update PHP matrix to match new minimum requirement
Removed PHP 7.2 and 7.3 entries, leaving only 7.4+ in the test matrix to align with the upgraded minimum PHP version.


1-102:

Details

✅ Verification successful

Verify removal of legacy PHP versions across CI configs
Double-check that no other workflow or CI configuration still references PHP 7.2 or 7.3 to prevent blind spots.


🏁 Script executed:

#!/bin/bash
# Search for remaining PHP 7.2 or 7.3 references in workflows
rg -Hn "php:.*'(7\.2|7\.3)'" .github/workflows

Length of output: 54


🏁 Script executed:

#!/bin/bash
# Search for any references to PHP 7.2 or 7.3 across all workflow files
rg -Hn "7\.2|7\.3" .github/workflows

Length of output: 38


🏁 Script executed:

#!/bin/bash
# Search for any references to PHP 7.2 or 7.3 across all YAML files in the repo
rg -Hn "7\.2|7\.3" -g "*.yml" -g "*.yaml"

Length of output: 43


No legacy PHP versions detected in CI workflows
I’ve searched all workflow and YAML files and found no remaining references to PHP 7.2 or 7.3.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@acicovic acicovic marked this pull request as ready for review June 4, 2025 11:59
@acicovic acicovic requested a review from a team as a code owner June 4, 2025 11:59
Copy link
Contributor

@alecgeatches alecgeatches left a comment

Choose a reason for hiding this comment

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

🎉

@acicovic acicovic merged commit d26b894 into develop Jun 9, 2025
34 checks passed
@acicovic acicovic deleted the update/minimum-php-version-to-7-4 branch June 9, 2025 08:37
github-actions bot added a commit that referenced this pull request Jun 9, 2025
@acicovic acicovic added the Changelog: Changed PR to be added under the changelog's "Changed" section label Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: Changed PR to be added under the changelog's "Changed" section Maintenance & Fixes Ticket/PR related to codebase maintenance tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade minimum PHP version to 7.4

2 participants