Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented May 10, 2025

Description

This commit fixes two issues:

  1. The PHPUnit coverage cache warming step was not being run for PHPUnit 10 or 11, while it should be.
  2. The code coverage build against PHP 8.1 started failing after the merge of PR PHP 8.4 | Add tokenization of asymmetric visibility #871, which started polyfilling the tokens for PHP 8.4 asymmetric visibility. This failure was caused by the following error:
    Message:  Token T_PUBLIC_SET has ID of type string, should be int. You may be using a library with broken token emulation
    Location: /home/runner/work/PHP_CodeSniffer/PHP_CodeSniffer/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php:35
    

All in all, this is the umpteenth time that PHP Parser is being a pain in the neck for us, but it is what it is.

Either way, this commit should fix it (again).

Suggested changelog entry

N/A

This commit fixes two issues:
1. The PHPUnit coverage cache warming step was not being run for PHPUnit 10 or 11, while it should be.
2. The code coverage build against PHP 8.1 started failing after the merge of PR 871, which started polyfilling the tokens for PHP 8.4 asymmetric visibility. This failure was caused by the following error:
    ```
    Message:  Token T_PUBLIC_SET has ID of type string, should be int. You may be using a library with broken token emulation
    Location: /home/runner/work/PHP_CodeSniffer/PHP_CodeSniffer/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php:35
    ```

All in all, this is the umpteenth time that PHP Parser is being a pain in the neck for us, but it is what it is.

Either way, this commit should fix it (again).
@jrfnl jrfnl added this to the 4.0.0 milestone May 10, 2025
@jrfnl jrfnl merged commit bba1846 into 4.x May 10, 2025
56 checks passed
@jrfnl jrfnl deleted the feature/fix-coverage-runs branch May 10, 2025 11:42
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.

1 participant