Skip to content

PHP report does not handle serialized code coverage data larger than 2 GB #971

Closed
@sakarikl

Description

@sakarikl
Q A
php-code-coverage version 9.2.22
PHP version 8.1.13
Driver PCOV
PCOV version (if used) 1.0.11
Installation Method Composer
Usage Method PHPUnit
PHPUnit version (if used) 9.5.27

Generating code coverage report in PHP format ... PHP Fatal error: Field width 2251485604 is too long in /.../vendor/phpunit/php-code-coverage/src/Report/PHP.php on line 30
Fatal error: Field width 2251485604 is too long in /.../vendor/phpunit/php-code-coverage/src/Report/PHP.php on line 30

triggered with command:

php -dpcov.enabled=1 -dpcov.directory=${CI_PROJECT_DIR} -dmemory_limit=10G -dmax_execution_time=3600 ../vendor/bin/phpunit -c phpunit.coverage.xml --coverage-php=${CI_PROJECT_DIR}/reports/coverage-report.php --log-junit ../reports/func-junit.xml functional 

this is our codebase size:

phploc 7.0.2 by Sebastian Bergmann.

Directories                                       1873
Files                                             7505

Size
  Lines of Code (LOC)                          1108084
  Comment Lines of Code (CLOC)                  214571 (19.36%)
  Non-Comment Lines of Code (NCLOC)             893513 (80.64%)
  Logical Lines of Code (LLOC)                  273299 (24.66%)
    Classes                                     265136 (97.01%)

And size of tests:

phploc 7.0.2 by Sebastian Bergmann.

Directories                                       1048
Files                                             2345

Size
  Lines of Code (LOC)                           253418
  Comment Lines of Code (CLOC)                   16828 (6.64%)
  Non-Comment Lines of Code (NCLOC)             236590 (93.36%)
  Logical Lines of Code (LLOC)                   78561 (31.00%)
    Classes                                      78558 (100.00%)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions