Skip to content

Solve the PHP_CodeSniffer & PHP-Parser collision during Coverage Collection #110

Description

@aik099
  • The PHPUnit 9.x started to use PHP-Parser during a coverage collection
  • PHP-Parser expects T_* tokens from newer PHP versions used on the older PHP versions to have integer values: https://github.com/nikic/PHP-Parser/blob/master/lib/PhpParser/compatibility_tokens.php
  • PHP_CodeSniffer also defines T_* tokens, but with string values
  • coverage collection fails with Token T_NAME_QUALIFIED has ID of type string, should be int. You may be using a library with broken token emulation error on PHP 7.4

Temporary solution (implemented):

  • use PHP 7.2 for coverage collection

Permanent solution:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions