Skip to content

Conversation

@anubisthejackle
Copy link
Contributor

@anubisthejackle anubisthejackle commented Oct 29, 2025

Summary

Fixes #57

This pull request removes all references to PHP Compatibility from the project. Specifically, the phpcompatibility/phpcompatibility-wp package is removed from the project's Composer dependencies, and the PHPCompatibilityWP ruleset is no longer included in the Alley-Interactive/ruleset.xml file. The coding standards ruleset will continue to use the WordPress-VIP-Go ruleset and maintain its existing testVersion configuration for PHP 8.1 and above.

As discussed in the related issue, PHPCompatibility has not kept pace with PHP's version releases and is no longer maintained at a level required for reliable compatibility checking. Modern alternatives, such as Rector or IDE-based inspections (e.g., PhpStorm's "language level" inspection), are recommended moving forward.

Motivation

  • PHPCompatibility is outdated and no longer maintained, with its last release in 2019.
  • Relying on it can provide a false sense of security regarding PHP version compatibility.
  • More modern and actively maintained tools exist for PHP version compatibility checks.

Changes

  • Removed the phpcompatibility/phpcompatibility-wp dependency from composer.json.
  • Deleted the reference to <rule ref="PHPCompatibilityWP" /> from Alley-Interactive/ruleset.xml.
  • The ruleset continues to use WordPress-VIP-Go and tests for PHP 8.1+ compatibility.

Testing

  • Confirm that PHPCompatibility is fully removed from dependencies and configuration files.
  • Verify that coding standards checks still pass without PHPCompatibility.
  • Ensure documentation or team processes reference modern alternatives such as Rector or IDE inspections for PHP compatibility.

Additional Context

See the original issue for more discussion: PHP Compatibility Should be Removed

Reference to prior configuration: https://github.com/alleyinteractive/alley-coding-standards/blob/develop/composer.json#L12

@anubisthejackle anubisthejackle added enhancement New feature or request php Requires understanding PHP labels Oct 29, 2025
@anubisthejackle anubisthejackle marked this pull request as ready for review October 29, 2025 18:54
@anubisthejackle anubisthejackle requested a review from a team as a code owner October 29, 2025 18:54
@anubisthejackle anubisthejackle merged commit e783219 into develop Oct 29, 2025
1 check passed
@anubisthejackle anubisthejackle deleted the feature/issue-57/remove-php-compatibility-check branch October 29, 2025 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request php Requires understanding PHP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PHP Compatibility Should be Removed

3 participants