简体   繁体   中英

Symfony PHPUnit tests issue

I have the following issue while running PHPUnit test cases in Symfony. I have tried removing various tests cases which could cause memory issues but no luck. is it something related to PHP VERSION ie 7.2.20?

$ phpdbg -qrr ./bin/phpunit --coverage-text --colors=never --coverage-html $CI_PROJECT_DIR/codecoverage/ --coverage-clover $CI_PROJECT_DIR/clover.xml --log-junit $CI_PROJECT_DIR/junit.xml -c . PHPUnit 7.5.12 by Sebastian Bergmann and contributors.

Testing Project Test Suite F.......FF.FF. [PHP Warning: Uncaught ErrorException: include(/builds/development/project/project-docs/var/cache/test/pools/yZJnsPMs0T/S/6/+yyw-9cjArnMASkmxItg): failed to open stream: No such file or directory in /builds/development/project/project-docs/vendor/symfony/cache/Traits/PhpFilesTrait.php:114 Stack trace:

#0 /builds/development/project/project-docs/vendor/symfony/cache/Traits/PhpFilesTrait.php(114): Symfony\\Component\\Cache\\Adapter\\PhpFilesAdapter::Symfony\\Component\\Cache\\Adapter{closure}(2, 'include(/builds...', '/builds/develop...', 114, Array)

#1 /builds/development/project/project-docs/vendor/symfony/cache/Traits/PhpFilesTrait.php(114): include()

#2 /builds/development/project/project-docs/vendor/symfony/cache/Traits/AbstractAdapterTrait.php(51): Symfony\\Component\\Cache\\Adapter\\PhpFilesAdapter->doFetch(Array)

#3 /builds/development/project/project-docs/vendor/symfony/cache/Adapter/TraceableAdapter.php(77): Symfony\\Component\\Cache\\Adapter\\AbstractAdapte in /builds/development/project/project-docs/vendor/symfony/cache/Traits/PhpFilesTrait.php on line 114] [PHP Fatal error: Out of memory (allocated 702808064) (tried to allocate 140362191340481 bytes) in /builds/development/project/project-docs/vendor/symfony/cache/Traits/PhpFilesTrait.php on line 114]

I also tried composer update

Yes, there is an issue with PHP 7.2.20 and 7.3.7

https://github.com/doctrine/DoctrineBundle/issues/990

The solution will be implemented in the next release of PHP, but for now there is no solution on those version, ideally avoid these versions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM