PHP单元测试错误-PHPUnit_Util_DeprecatedFeature_记录器

PHP单元测试错误-PHPUnit_Util_DeprecatedFeature_记录器,php,unit-testing,web,phpunit,composer-php,Php,Unit Testing,Web,Phpunit,Composer Php,我已经为作曲家安装了PHPUnit。我在composer.json中有以下行 "require-dev": { "phpunit/phpunit": "~4.3" }, 当我运行我的测试用例时,我得到了低于错误的结果。我已搜索此错误,但在web中找不到可能的相关解决方案: Vishal@VISHAL-PC c:\xampp\htdocs\V4\test\Core phpunit ResponseTest PHPUnit 4

我已经为作曲家安装了PHPUnit。我在composer.json中有以下行

  "require-dev": {
    "phpunit/phpunit": "~4.3"
},  
当我运行我的测试用例时,我得到了低于错误的结果。我已搜索此错误,但在web中找不到可能的相关解决方案:

        Vishal@VISHAL-PC c:\xampp\htdocs\V4\test\Core

        phpunit ResponseTest 


        PHPUnit 4.3.5 by Sebastian Bergmann.


       Fatal error: Class PHPUnit_Util_DeprecatedFeature_Logger contains 1 abstract met
       hod and must therefore be declared abstract or implement the remaining methods (
      PHPUnit_Framework_TestListener::addRiskyTest) in C:\xampp\php\pear\PHPUnit\Util\
      DeprecatedFeature\Logger.php on line 201

我不知道这是从哪里来的。任何建议,链接或评论将非常感谢

PHPUnit 4.2中删除了
PHPUnit\u Util\u DeprecatedFeature\u Logger
类。如果您的PHPUnit 4.3安装试图使用该类,这意味着您的安装不知怎么搞砸了。

您仍然从以前安装的位置继续运行PHPUnit。要从composer运行它,请将以下allias添加到.bashrc文件

sudo nano ~/.bashrc

alias phpunit="/{path_to_project}/vendor/bin/phpunit"

确保此文件C:\xampp\php\pear\PHPUnit\Util\DeprecatedFeature\Logger.php具有抽象方法,如果是,请尝试更改为接近4.3.5的其他版本。谢谢@Pradeep!似乎它在Loger.php中没有抽象方法,而是添加了一个。它现在正在工作。