如何修复'预期类型'Psr \ Http \ Message \ RequestInterface'?

我尝试使用 guzzlehttp/guzzle来发送邮件,但它却报错了。

我试过把 Psr7\Request 换成\Psr\Http\Message\RequestInterface,但还是没用,还报了另外的错误:

'Cannot instantiate interface Psr\Http\Message\RequestInterface'.

我不知道该怎么办了。

public function requestAsync($method, $uri = '', array $options = [])
    {
        $options = $this->prepareDefaults($options);
        // Remove request modifying parameter because it can be done up-front.
        $headers = isset($options['headers']) ? $options['headers'] : [];
        $body = isset($options['body']) ? $options['body'] : null;
        $version = isset($options['version']) ? $options['version'] : '1.1';
        // Merge the URI into the base URI.
        $uri = $this->buildUri($uri, $options);
        if (is_array($body)) {
            $this->invalidBody();
        }
        $request = new Psr7\Request($method, $uri, $headers, $body, $version);
        // Remove the option so that they are not doubly-applied.
        unset($options['headers'], $options['body'], $options['version']);

        return $this->transfer($request, $options);
    }

它给了这个错误提示:

( Expected type 'Psr\Http\Message\RequestInterface'. Found 'GuzzleHttp\Psr7\Request' ).