Skip to content

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

Merged
htdat merged 2 commits into
masterfrom
update/coverage-checker
Jun 1, 2021
Merged

PHP 8.0 and PHPCS: partly fix compatibility with composer packages#643
htdat merged 2 commits into
masterfrom
update/coverage-checker

Conversation

@htdat
Copy link
Copy Markdown
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 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
Comment thread bin/phpcs-diff.sh
$DIR/../vendor/bin/phpcs --extensions=php --standard=phpcs.xml.dist --report=json > $PHPCS_FILE || true

$DIR/../vendor/bin/diffFilter --phpcs $DIFF_FILE $PHPCS_FILE 0
$DIR/../vendor/bin/diffFilter --phpcs $DIFF_FILE $PHPCS_FILE 100
Copy link
Copy Markdown
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 Dependency updates 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
Copy Markdown
Contributor

@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

dependencies Dependency updates type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PHP 8.0 - PHPCS tests - incompatibility with exussum12/coverage-checker PHP 8.0 tests: fail with composer packages

2 participants