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

Improve PHP 8 compatibility and testing #421

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

swissspidy
Copy link

Bumps PHP requirement to 5.6+, runs tests against all PHP versions from 5.6 - 8.4

Fixes #374

@swissspidy
Copy link
Author

@bobthecow Would appreciate eyes on this

test/Mustache/Test/TokenizerTest.php Outdated Show resolved Hide resolved
@reedy
Copy link

reedy commented Dec 12, 2024

Some overlap with #404

@swissspidy swissspidy requested a review from reedy December 17, 2024 13:09
"phpunit/phpunit": "~3.7|~4.0|~5.0",
"friendsofphp/php-cs-fixer": "~1.11"
"friendsofphp/php-cs-fixer": "~2.19.3",
"yoast/phpunit-polyfills": "^2.0"
Copy link

Choose a reason for hiding this comment

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

My biggest question here is whether we need to keep such old PHP version support, a such, such old PHPUnit version support... and therefore whether we actually need the polyfills at all

Copy link
Author

Choose a reason for hiding this comment

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

For consuming projects like WP-CLI, PHP 5.6 is still required this year. After that, 7.0 or 7.2.

But even then, there is no single PHPUnit version that covers all PHP versions and is fully supported, see https://phpunit.de/supported-versions.html.

Plus, the polyfills provide forward compatibility, so that you can always use the latest PHPUnit features, even if you still need to use PHPUnit 8 for older PHP versions. Thus, this package is still very useful even if the project requires more modern PHP versions.

This was referenced Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP 8.1 compatibility
2 participants