cloudflare / cloudflare-php

PHP library for the Cloudflare v4 API
BSD 3-Clause "New" or "Revised" License
621 stars 222 forks source link

Adapter Interface should not enforce constructor #145

Open turkelt0n opened 4 years ago

turkelt0n commented 4 years ago

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

keithbrink commented 2 years ago

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.