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 #2414

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Dec 10, 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:

  • Widening the PHPUnit version requirements.
  • Adding the PHPUnit 8+ cache file to .gitignore.
  • Updating the PHPUnit configuration to make sure that deprecations will always show, even when on a high PHPUnit 9.6 version.
  • Updating the info in CONTRIBUTING.
  • Simplifications to the quicktest and test workflows. Also, the code coverage "high" run can now be run against PHP 8.3.
  • Running PHPStan against PHP latest (couldn't previously be done due to the old PHPUnit version).
  • Minor tweak to the PHPStan config to make sure PHP 8.x specific issues don't get flagged for this codebase.
  • Removing a no longer needed --ignore-platform* argument.
  • Updating the "setUp" method in one test to call the parent "setUp" method via the new method name.

Ref:

.github/workflows/quicktest.yml Outdated Show resolved Hide resolved
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:
* Widening the PHPUnit version requirements.
* Adding the PHPUnit 8+ cache file to `.gitignore`.
* Updating the PHPUnit configuration to make sure that deprecations will always show, even when on a high PHPUnit 9.6 version.
* Updating the info in `CONTRIBUTING`.
* Simplifications to the `quicktest` and `test` workflows.
    Also, the code coverage "high" run can now be run against PHP 8.3.
* Running PHPStan against PHP `latest` (couldn't previously be done due to the old PHPUnit version).
* Minor tweak to the PHPStan config to make sure PHP 8.x specific issues don't get flagged for this codebase.
* Removing a no longer needed `--ignore-platform*` argument.
* Updating the "setUp" method in one test to call the parent "setUp" method via the new method name.

Ref:
* PHPCSStandards/PHP_CodeSniffer 59
@jrfnl jrfnl force-pushed the feature/phpunit-cross-version branch from b4368d5 to bb305f8 Compare December 11, 2023 13:16
@dingo-d
Copy link
Member

dingo-d commented Dec 12, 2023

This closes #2123 issue if I'm not mistaken.

@jrfnl
Copy link
Member Author

jrfnl commented Dec 12, 2023

This closes #2123 issue if I'm not mistaken.

Ow, nice catch, I missed that issue. Still, that one is not closed by this PR, but was fixed by the last commit in #2408.

@GaryJones GaryJones merged commit 5f0c8a7 into develop Dec 12, 2023
40 checks passed
@GaryJones GaryJones deleted the feature/phpunit-cross-version branch December 12, 2023 12:04
@@ -127,8 +127,7 @@ jobs:
custom-cache-suffix: $(date -u "+%Y-%m")

- name: "Set PHPCS version (lowest)"
if: ${{ matrix.phpcs_version == 'lowest' }}
Copy link
Member Author

@jrfnl jrfnl Dec 12, 2023

Choose a reason for hiding this comment

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

Shoot! This condition shouldn't have been removed... Must have accidentally happened during one of the rebases....

I will fix this up.

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.

3 participants