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

Simplify usage by updating to new default loop and making Browser optional #56

Merged
merged 2 commits into from
Aug 13, 2021

Conversation

SimonFrings
Copy link
Contributor

This changeset simplifies usage by supporting the new default loop.

// old (still supported)
$browser = new React\Http\Browser($loop);
$client = new Clue\React\Soap\Client($browser, $wsdl, $options);

// new (using default loop)
$client = new Clue\React\Soap\Client(null, $wsdl, $options);

Builds on top of reactphp/event-loop#226, reactphp/event-loop#229, reactphp/event-loop#232, reactphp/socket#264 and reactphp/http#418

Copy link
Owner

@clue clue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimonFrings Thanks for looking into this, only a minor remark below 👍

@@ -55,7 +54,7 @@ public function testBlzService()

$promise = $api->getBank(array('blz' => '12070000'));

$result = Block\await($promise, $this->loop);
$result = Block\await($promise, \React\EventLoop\Loop::get());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably use an import instead, no? (See also below)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, it's easier to read this way 👍

@clue clue added this to the v2.1.0 milestone Aug 12, 2021
Copy link
Owner

@clue clue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimonFrings Thanks for the update, changes LGTM! :shipit:

@clue clue merged commit e802f94 into clue:main Aug 13, 2021
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.

2 participants