Skip to content

Do not use discovery in client #33

Closed
@sagikazarmark

Description

@sagikazarmark

Currently we have clients like this:

class Client implements HttpClient
{
    public function __construct(MessageFactory $mf = null)
    {
       // Use discovery if MF is not passed
    }
}

I think we should rather force the user to pass a message factory and use the discovery manually OR use a static constructor, like Client::zeroConfig to setup the client.

The big advantage would be forcing DI and removing discovery dependency from client implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions