Skip to content

GitHub Actions CI tests are failing on PHP 7.x #1288

@osma

Description

@osma

At which URL did you encounter the problem?

https://github.com/NatLibFi/Skosmos/runs/5493589722

What steps will reproduce the problem?

  1. Do something (e.g. open a PR) that triggers a GitHub Actions CI job

What is the expected output? What do you see instead?

Expected for PHPUnit tests to pass, but they are all failing on PHP 7.x with this kind of error:

 There were 482 errors:

1) BreadcrumbTest::testConstruct
PHPUnit\Framework\Exception: Fatal error: Uncaught TypeError: Argument 3 passed to PHP_Token::__construct() must be an instance of PHP_Token_Stream, instance of PHPUnit\PHP_Token_Stream given, called in phar:///usr/local/bin/phpunit/php-token-stream/Token/Stream.php on line 131 and defined in /app/vendor/phpunit/php-token-stream/src/Token.php:37
Stack trace:
#0 phar:///usr/local/bin/phpunit/php-token-stream/Token/Stream.php(131): PHP_Token->__construct('<?php\n', 1, Object(PHPUnit\PHP_Token_Stream), 0)
#1 phar:///usr/local/bin/phpunit/php-token-stream/Token/Stream.php(73): PHPUnit\PHP_Token_Stream->scan('<?php\n\n/**\n * A...')
#2 phar:///usr/local/bin/phpunit/php-code-coverage/CodeCoverage.php(515): PHPUnit\PHP_Token_Stream->__construct('<?php\n\n/**\n * A...')
#3 phar:///usr/local/bin/phpunit/php-code-coverage/CodeCoverage.php(496): PHPUnit\SebastianBergmann\CodeCoverage\CodeCoverage->getLinesToBeIgnoredInner('/app/model/Brea...')
#4 phar:///usr/local/bin/phpunit/php-code-coverage/CodeCoverage.php(450): PHPUnit\SebastianBergmann\CodeCoverage\CodeCo in /app/vendor/phpunit/php-token-stream/src/Token.php on line 37

PHP 8.0 is not affected - tests are working fine.

I just installed Skosmos on an Ubuntu 20.04 system with PHP 7.4 and ran the tests without problems. So the problem only appears under GitHub Actions CI currently.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions