Fatal error: Declaration of Codeception\PHPUnit\Listener::addError

I am getting this error when trying to run codcept right after a fresh yii2 install(basic template). My php version is 7.1.16

Codeceptions is build on top of phpunit looks like you have the latest version of phpunit and codeceptions does not support it.