我想在Eclipse(4.7.3a)开发的PHP项目中使用PHPUnit
我首先通过Composer安装了PHPUnit(软件包列表如以下composer.json中所述)
然后我安装了PHP开发工具,尤其是PHPUnit支持(6.1.0.20180828281524)
然后我尝试运行PHPUnit时,收到消息
Fatal error: Declaration of PHPUnitLogger::flush() must be compatible with PHPUnit\Util\Util\Printer::flush(): void in /private/var/folders/mp/_jmfjcd91jdbjjrx6w23600h0000gn/T/phpunit_printer/PHPUnitLogger.php on line 33
什么是安装错误?
谢谢。
Composer.json:
{
"autoload" : {
"psr-4" : {
"Adlc\\Objects\\" : "lib-src/objects/",
"Adlc\\Db\\" : "lib-src/db/"
}
},
"name" : "Adlc/V2-BP-library",
"type" : "library",
"description" : "Shared code for V2",
"require" : {
"php" : ">=7.1",
"aws/aws-sdk-php" : "~3.81",
"lcobucci/jwt" : "~3.2",
"robthree/twofactorauth" : "~1.6",
"monolog/monolog" : "~1.24",
"maxbanton/cwh" : "~1.1",
"phpunit/phpunit" : "~7.5"
}
}