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

Tests: allow for PHPUnit 8/9 #356

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Dec 12, 2023

PHP_CodeSniffer 3.8.0 now allows for running the tests, which are based on the PHPCS native test suite, with PHPUnit 8 and 9.

This commit updates the package to take advantage of that.

Includes:

  • Update the PHPUnit version requirements.
    As this package no longer supports PHP < 7.2, PHPUnit 8 + 9 is all that's needed.
  • Adding the PHPUnit 8+ cache file to .gitignore.
  • Simplifications to the quicktest and test workflows. Also, the code coverage "high" run can now be run against PHP 8.3.
  • Removing a no longer needed --ignore-platform* argument.
  • MInor tweaks to the CS run on the code of YoastCS itself.
  • Normalize a teardown method. This was set up with an @after tag in anticipation of this PR, but before dropping support for PHP < 7.2. As PHP < 7.2 has been dropped, we don't need to support PHPUnit 7 or lower anymore, so don't need this tweak to make the fixture methods cross-version compatible anymore.

Ref:

@jrfnl jrfnl added this to the 3.0 milestone Dec 12, 2023
@coveralls
Copy link

coveralls commented Dec 12, 2023

Coverage Status

coverage: 99.411% (+0.03%) from 99.378%
when pulling 8de22f4 on feature/composer-widen-phpunit-constraints
into d8217d0 on develop.

PHP_CodeSniffer 3.8.0 now allows for running the tests, which are based on the PHPCS native test suite, with PHPUnit 8 and 9.

This commit updates the package to take advantage of that.

Includes:
* Update the PHPUnit version requirements.
    As this package no longer supports PHP < 7.2, PHPUnit 8 + 9 is all that's needed.
* Adding the PHPUnit 8+ cache file to `.gitignore`.
* Simplifications to the `quicktest` and `test` workflows.
    Also, the code coverage "high" run can now be run against PHP 8.3.
* Removing a no longer needed `--ignore-platform*` argument.
* MInor tweaks to the CS run on the code of YoastCS itself.
* Normalize a teardown method.
    This was set up with an `@after` tag in anticipation of this PR, but before dropping support for PHP < 7.2.
    As PHP < 7.2 has been dropped, we don't need to support PHPUnit 7 or lower anymore, so don't need this tweak to make the fixture methods cross-version compatible anymore.

Ref:
* PHPCSStandards/PHP_CodeSniffer 59
@jrfnl jrfnl force-pushed the feature/composer-widen-phpunit-constraints branch from 396e173 to 8de22f4 Compare December 12, 2023 15:55
@jrfnl jrfnl merged commit 0b0a299 into develop Dec 12, 2023
27 checks passed
@jrfnl jrfnl deleted the feature/composer-widen-phpunit-constraints branch December 12, 2023 16:21
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.

2 participants