Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change typehint for fromConfig in ClientBuilder #1300

Open
leonrenkema opened this issue Mar 3, 2023 · 0 comments
Open

Change typehint for fromConfig in ClientBuilder #1300

leonrenkema opened this issue Mar 3, 2023 · 0 comments

Comments

@leonrenkema
Copy link

Hi,

I saw the issue (#1227) where an interface for the Client is added to support mocking in the unittest.

Maybe it is an idea to also let the ClientBuilder have the ClientInterface as returntype instead of Client.

public static function fromConfig(array $config, bool $quiet = false): Client

Then it will be possible to Mock the ClientBuilder and let fromConfig return a mocked instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant