Mac OS Mojave phpunit 8.0.1 symfony

Mac OS Mojave phpunit 8.0.1 symfony,phpunit,php-7.2,Phpunit,Php 7.2,安装PHPunit 8.0.1后,我出现以下错误: Fatal error: Declaration of Symfony\Bundle\FrameworkBundle\Test\KernelTestCase::tearDown() must be compatible with PHPUnit\Framework\TestCase::tearDown() 我使用的是PHP7.2您的拆卸函数与您扩展的函数不兼容。 为了实现相同的声明,必须添加返回类型 protected function te

安装PHPunit 8.0.1后,我出现以下错误:

Fatal error: Declaration of Symfony\Bundle\FrameworkBundle\Test\KernelTestCase::tearDown() must be compatible with PHPUnit\Framework\TestCase::tearDown()

我使用的是PHP7.2

您的拆卸函数与您扩展的函数不兼容。 为了实现相同的声明,必须添加返回类型

protected function tearDown(): void

另请参见文档部分“模板方法的返回类型”

您的拆卸函数与扩展的函数不兼容。 为了实现相同的声明,必须添加返回类型

protected function tearDown(): void
另请参见文档部分“模板方法的返回类型”