gpt4 book ai didi

php - require_once(PHP/CodeCoverage/Filter.php): failed to open stream

转载 作者:行者123 更新时间:2023-11-28 20:04:01 24 4
gpt4 key购买 nike

我正在尝试熟悉 Symfony 2.3.24/Windows7/PHP 5.4.7 下的测试(单元、功能)。

似乎 PHPUnit 已正确安装(通过 Composer),但是当我运行 phpunit -c app/ 命令时,出现以下错误:

Warning: require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in C:\xampp\php\phpunit on line 38

Fatal error: require_once(): Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\php\phpunit on line 38

我用谷歌搜索了这个问题,但没有结果。我还在 PHPUnit 官方网站上发现 代码覆盖率报告功能需要 Xdebug(2.1.3 或更高版本)和标记器扩展

你怎么看待这一切?非常感谢您的帮助。

最佳答案

在当前版本的 PHPUnit 中,phpunit 脚本不直接包含 PHP/CodeCoverage/Filter.php。看来您使用的是过时版本的 PHPUnit 和/或混淆了 Composer/PEAR 安装。

请按照 https://phpunit.de/getting-started.html 上的说明进行操作正确安装 PHPUnit。和 http://thephp.cc/news/2015/01/phpunit-migration-from-pear-to-phar解释了如何从基于 PEAR 的安装迁移到 Composer 或 PHAR。

关于php - require_once(PHP/CodeCoverage/Filter.php): failed to open stream,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28112102/

24 4 0