sebastianbergmann / phpcov

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

PHP 8 support #124

Closed Legion112 closed 1 year ago

Legion112 commented 1 year ago

Currently no support for php8

docker-compose run -it coverage patch-coverage --path-prefix /app var/unit.cov var/patch.txt
phpcov 8.2.1 by Sebastian Bergmann.

Parse error: syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE) in /app/src/Command/BackgroundTasksDaemonCommand.php on line 24
make: *** [docker.run.coverage.diff] Error 255

The PHP class /app/src/Command/BackgroundTasksDaemonCommand.php on line 24

    public function __construct(
        private readonly array $commands,
    ) {
        parent::__construct();
    }

Seem like it looked to php8 here

sebastianbergmann commented 1 year ago

This tool as well as the library it uses, phpunit/php-code-coverage, are compatible with PHP 8. Are you sure that you have PHP >= 8.1 in your container? Anyway, I am closing this issue as this is not related to this tool but rather to your PHP environment.