Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 15, 2025

Description

Drop support for PHP < 7.2

This commit is a plain version drop.

This commit does not include:

  • Removing any work-arounds which may exist in the codebase, to support PHP < 7.2.
  • Modernizing the codebase.

These things can be addressed at will in follow up PRs.

Fixes #2606

Tests: use standardized fixture methods

As support for PHPUnit < 8.0 will now be dropped, we no longer need to use the @before/@after[Class] annotations for fixture methods and can revert back to using the standard PHPUnit setUp|tearDown[BeforeClass]() fixture methods (with a void return type).

GH Actions: remove build with special set of extensions

There was a special build included which is supposed disable Mbstring and record code coverage, but the extensions key was missing from the setup-php action runner, so Mbstring was never disabled....

Another thing to know about this build is that Mbstring is a required extension for PHPUnit, but it is only really needed when PHPUnit is run with the --testdox CLI flag.
In later PHPUnit versions, this requirement is enforced across the board (Composer + PHAR), but that's not yet the case for the PHPUnit 8 PHAR file. However, as we run the tests via a Composer install, that install will still fail on the PHPUnit mbstring requirement.

All in all, this build adds nothing and can be removed.

Suggested changelog entry

The minimum supported PHP version is now PHP 7.2 (was PHP 5.4).

@jrfnl
Copy link
Member Author

jrfnl commented Sep 15, 2025

Mind: branch protection will need to be updated to be able to merge this PR.

I also think this should be in a minor, not a patch version, so I've milestoned this PR for WPCS 3.3.0 and we may need to re-milestone whatever is in the 3.2.x milestone.

jrfnl and others added 2 commits September 15, 2025 22:49
This commit is a plain version drop.

This commit does **not** include:
* Removing any work-arounds which _may_ exist in the codebase, to support PHP < 7.2.
* Modernizing the codebase.

These things can be addressed at will in follow up PRs.

Fixes 2606
As support for PHPUnit < 8.0 will now be dropped, we no longer need to use the `@before`/`@after`[Class] annotations for fixture methods and can revert back to using the standard PHPUnit `setUp|tearDown[BeforeClass]()` fixture methods (with a `void` return type).
@jrfnl jrfnl force-pushed the feature/2606-drop-support-for-php-lt-7.2 branch from 4813ef8 to 8bcff6b Compare September 15, 2025 20:54
There was a special build included which is supposed disable Mbstring and record code coverage, but the `extensions` key was missing from the `setup-php` action runner, so Mbstring was never disabled....

Another thing to know about this build is that Mbstring is a required extension for PHPUnit, but it is only really needed when PHPUnit is run with the `--testdox` CLI flag.
In later PHPUnit versions, this requirement is enforced across the board (Composer + PHAR), but that's not yet the case for the PHPUnit 8 PHAR file. However, as we run the tests via a Composer install, that install will still fail on the PHPUnit `mbstring` requirement.

All in all, this build adds nothing and can be removed.
@jrfnl jrfnl force-pushed the feature/2606-drop-support-for-php-lt-7.2 branch from 8bcff6b to 781bb22 Compare September 15, 2025 20:58
@jrfnl
Copy link
Member Author

jrfnl commented Sep 16, 2025

Seeing as there are two approvals, I'll update the branch protection and will merge the PR after.

I will also re-milestone everything in the "3.2 next" milestone to the 3.3.0 one.

@jrfnl jrfnl merged commit 7d15d40 into develop Sep 16, 2025
40 checks passed
@jrfnl jrfnl deleted the feature/2606-drop-support-for-php-lt-7.2 branch September 16, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dropping support for PHP < 7.2

5 participants