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

PHP 8.0 and PHPCS: partly fix compatibility with composer packages #643

Merged
merged 2 commits into from
Jun 1, 2021

Conversation

htdat
Copy link
Member

@htdat htdat commented May 11, 2021

Partly fix #638
Close #647

Description

  • Update "coverage-checker" so that it can support PHP 8.0.
  • Stop running PHPCS for PHP 8.0 as WPCS is not ready as mentioned here PHP 8.0 tests: fail with composer packages #638 (comment).
  • Update bin/phpcs-diff.sh then (1) it will not fetch all branches (we just need master branch), and (2) it will show errors when diff lines do not conform with PHPCS. Currently, it does not exit with any error.
  • Remove tests for PHP 8.1 - see here.

Steps to Test

Mainly check the relevant GitHub Actions for PHP Tests here.

Note: for PHP 8.0 test failure, it will be addressed in another PR as the solution is here #639 (comment)

@htdat htdat added the Bug label May 11, 2021
@htdat htdat requested a review from mikeyarce May 11, 2021 08:47
@htdat htdat self-assigned this May 11, 2021
@htdat htdat requested a review from natebot May 11, 2021 08:48

$DIR/../vendor/bin/diffFilter --phpcs $DIFF_FILE $PHPCS_FILE 0
$DIR/../vendor/bin/diffFilter --phpcs $DIFF_FILE $PHPCS_FILE 100
Copy link
Member Author

Choose a reason for hiding this comment

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

With the previous value 0, this test will never yell exit with an error status. Therefore, we can not recognize issues when running CI.
Ref: https://github.com/exussum12/coverageChecker#usage

@htdat htdat added the Dependencies Pull requests that update a dependency file label May 12, 2021
@htdat htdat changed the title Partly fix PHP 8.0 compatibility with composer packages PHP 8.0 and PHPCS: partly fix compatibility with composer packages May 14, 2021
Copy link
Member

@mikeyarce mikeyarce left a comment

Choose a reason for hiding this comment

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

Looks good! 👍🏽

@htdat htdat merged commit 1770298 into master Jun 1, 2021
@htdat htdat deleted the update/coverage-checker branch June 1, 2021 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dependencies Pull requests that update a dependency file
Projects
None yet
2 participants