This is the official interface declaration from psr/http-factory
namespace Psr\Http\Message;
interface RequestFactoryInterface
{
/**
* Create a new request.
*
* @param string $method The HTTP method associated with the request.
* @param UriInterface|string $uri The URI associated with the request. If
* the value is a string, the factory MUST create a UriInterface
* instance based on it.
*
* @return RequestInterface
*/
public function createRequest(string $method, $uri): RequestInterface;
}
As you can is in the comment for $uri parameter it can be either string or UriInterface. Your implementation assumes string only. I think it should be fixed.
This is the official interface declaration from psr/http-factory
As you can is in the comment for $uri parameter it can be either string or UriInterface. Your implementation assumes string only. I think it should be fixed.