在Symfony中运行PHPUnit测试用例时遇到以下问题。我尝试删除各种可能导致内存问题但没有运气的测试用例。它与PHP版本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。 Sebastian Bergmann和贡献者的PHPUnit 7.5.12。
测试项目测试套件F ....... FF.FF。 [PHP警告:未捕获 ErrorException: 包括(/ builds / development / project / project-docs / var / cache / test / pools / yZJnsPMs0T / S / 6 / + yyw-9cjArnMASkmxItg): 无法打开流:在该目录中没有这样的文件或目录 /builds/development/project/project-docs/vendor/symfony/cache/Traits/PhpFilesTrait.php:114 堆栈跟踪:
#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中 /builds/development/project/project-docs/vendor/symfony/cache/Traits/PhpFilesTrait.php 在第114行] [PHP致命错误:内存不足(已分配702808064) (尝试分配140362191340481字节)在 /builds/development/project/project-docs/vendor/symfony/cache/Traits/PhpFilesTrait.php 在第114行]
我也尝试过composer update
答案 0 :(得分:0)
是的,PHP 7.2.20和7.3.7存在问题
https://github.com/doctrine/DoctrineBundle/issues/990
该解决方案将在下一版PHP中实现,但目前在这些版本上没有解决方案,最好避免使用这些版本。