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

Replace Factory with simplified Client constructor #31

Merged
merged 2 commits into from
Sep 11, 2018

Conversation

clue
Copy link
Owner

@clue clue commented Sep 11, 2018

This PR replaces the Factory with the now simplified Client constructor:

// old
$factory = new Factory($loop);
$factory->createClient($wsdl)->then(function (Client $client) {
    // client ready
    …
});

// new
$browser = new Browser($loop);
$browser->get($wsdl)->then(function (ResponseInterface $response) use ($browser) {
    $client = new Client($browser, (string)$response->getBody());
    // client ready
    …
});
// old
$factory = new Factory($loop);
$client = $factory->createClientFromWsdl($wsdl);

// new
$browser = new Browser($loop);
$client = new Client($browser, $wsdl);

Among others, this is also a prerequisite for non-WSDL mode (#5) and additional SOAP options.
Builds on top of #26 and #30.
Supersedes / closes #15.

@clue clue added this to the v0.3.0 milestone Sep 11, 2018
@clue clue merged commit 412e0a5 into clue:master Sep 11, 2018
@clue clue deleted the client-ctor branch September 11, 2018 20:27
@clue clue modified the milestones: v0.3.0, v1.0.0 Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename createClient() to something more meaningful
1 participant