现在的位置: 首页 > 综合 > 正文

PHP Warning: require_once(PHP/CodeCoverage/Filter.php)

2017年12月24日 ⁄ 综合 ⁄ 共 599字 ⁄ 字号 评论关闭

今天安装在linux上安装了phpunit,使用的时候遇到了这个情况

$:/usr/bin$ phpunit
PHP Warning:  require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 38
PHP Fatal error:  require_once(): Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/bin/phpunit on line 38

在网上查了下,是phpunit的一个bug,然后有人提供了一个workaround:

sudo apt-get remove phpunit
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover components.ez.no
sudo pear update-channels
sudo pear upgrade-all
sudo pear force --alldeps phpunit/PHPUnit

抱歉!评论已关闭.