sebastianbergmann / phpcov

TextUI frontend for php-code-coverage
BSD 3-Clause "New" or "Revised" License
223 stars 58 forks source link

PHP Warning: Use of undefined constant T_MATCH #104

Closed iamrekas closed 3 years ago

iamrekas commented 3 years ago

Try update phpcov using phive from 8.1.0 to 8.1.1 have some warnings:

Warning: Use of undefined constant T_MATCH - assumed 'T_MATCH' (this will throw an Error in a future version of PHP) in phar:///home/vscode/.phive/phars/phpcov-8.1.1.phar/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php on line 970

Call Stack: 0.0043 570880 1. {main}() /home/vscode/.phive/phars/phpcov-8.1.1.phar:0 0.0231 980816 2. SebastianBergmann\PHPCOV\Application->run() /home/vscode/.phive/phars/phpcov-8.1.1.phar:799 0.0246 1086992 3. SebastianBergmann\PHPCOV\MergeCommand->run() phar:///home/vscode/.phive/phars/phpcov-8.1.1.phar/src/cli/Application.php:47 0.0387 5774288 4. SebastianBergmann\PHPCOV\MergeCommand->handleReports() phar:///home/vscode/.phive/phars/phpcov-8.1.1.phar/src/cli/MergeCommand.php:84 0.0390 5797600 5. SebastianBergmann\CodeCoverage\Report\Html\Facade->process() phar:///home/vscode/.phive/phars/phpcov-8.1.1.phar/src/cli/Command.php:108 4.5625 16176432 6. SebastianBergmann\CodeCoverage\Report\Html\File->render() phar:///home/vscode/.phive/phars/phpcov-8.1.1.phar/phpunit/php-code-coverage/src/Report/Html/Facade.php:103 4.5641 16182744 7. SebastianBergmann\CodeCoverage\Report\Html\File->renderSourceWithLineCoverage() phar:///home/vscode/.phive/phars/phpcov-8.1.1.phar/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php:113 4.5643 16183288 8. SebastianBergmann\CodeCoverage\Report\Html\File->loadFile() phar:///home/vscode/.phive/phars/phpcov-8.1.1.phar/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php:399

sebastianbergmann commented 3 years ago

https://github.com/sebastianbergmann/php-code-coverage/issues/808 is the root cause.

sebastianbergmann commented 3 years ago

Version 8.1.2 has been released with an up-to-date version of phpunit/php-code-coverage bundled in the PHAR.