stream icon indicating copy to clipboard operation
stream copied to clipboard

Fix PHP unit tests with PHP 8

Open kasparsd opened this issue 4 years ago • 0 comments

Feature Request

Make the phpunit tests work with PHP 8. It appears that the php-token-stream library referenced by phpunit isn't compatible with PHP 8:

Stack trace:
#0 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/php-token-stream/src/Token/Stream.php(118): PHP_Token_Stream->scan('<?php\n/**\n * Al...')
#1 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/php-code-coverage/src/CodeCoverage.php(764): PHP_Token_Stream->__construct('<?php\n/**\n * Al...')
#2 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/php-code-coverage/src/CodeCoverage.php(673): SebastianBergmann\CodeCoverage\CodeCoverage->getLinesToBeIgnored('/var/www/html/w...')
#3 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/php-code-coverage/src/CodeCoverage.php(321): SebastianBergmann\CodeCoverage\CodeCoverage->applyIgnoredLinesFilter(Array)
#4 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/php-code-coverage/src/CodeCoverage.php(1104): SebastianBergmann\CodeCoverage\CodeCoverage->append(Array, 'UNCOVERED_FILES...')
#5 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/php-code-coverage/src/CodeCoverage.php(256): SebastianBergmann\CodeCoverage\CodeCoverage->initializeData()
#6 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/phpunit/src/Framework/TestResult.php(650): SebastianBergmann\CodeCoverage\CodeCoverage->start(Object(WP_Stream\Test_Alert_Trigger_Action))
#7 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/phpunit/src/Framework/TestCase.php(868): PHPUnit_Framework_TestResult->run(Object(WP_Stream\Test_Alert_Trigger_Action))
#8 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult))
#9 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(733): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#10 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#11 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true)
#12 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true)
#13 /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main()
#14 {main}
  thrown in /var/www/html/wp-content/plugins/stream-src/vendor/phpunit/php-token-stream/src/Token/Stream.php on line 189

kasparsd avatar Aug 31 '21 09:08 kasparsd