cloudflare-php icon indicating copy to clipboard operation
cloudflare-php copied to clipboard

Adapter Interface should not enforce constructor

Open turkelt0n opened this issue 4 years ago • 1 comments

https://github.com/cloudflare/cloudflare-php/blob/master/src/Adapter/Adapter.php#L26

interface Adapter
{
    /**
     * Adapter constructor.
     *
     * @param Auth $auth
     * @param string $baseURI
     */
    public function __construct(Auth $auth, string $baseURI);

An interface should not enforce any constructor as this is an implementation-issue

turkelt0n avatar Sep 30 '20 11:09 turkelt0n

In addition, it would be much nicer if the interface was the PSR interface (\Psr\Http\Client\ClientInterface) so that we could use any Http client.

keithbrink avatar May 11 '22 06:05 keithbrink