Incompatible implementation of send() in Client / ClientInterface (phpunit)?

Incompatible implementation of send() in Client / ClientInterface (phpunit)?
开发环境 lumen
在phpunit执行测试时报错

PHP Fatal error: Declaration of GuzzleHttp\Client::send() must be compatible with GuzzleHttp\ClientInterface::send(GuzzleHttp\Message\RequestInterface $request) in /Users/michael/Code/contrib/guzzle/src/Client.php on line 26

https://github.com/guzzle/guzzle/issues/1214

找到报错的解决帖

发现自己的项目版本挺新的

于是在autoload加上加载文件的文件名输出

发现加载了global 文件
框架安装的时候是全局安装的
composer update却只更新了本项目
找到global的composer。json文件,把phpunit之外的项目都删掉,global update 解决问题

Leave a Reply

Your email address will not be published. Required fields are marked *