Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Update guzzle6 adapater with httplug new contract #5

Merged
merged 4 commits into from
Oct 23, 2015
Merged

Update guzzle6 adapater with httplug new contract #5

merged 4 commits into from
Oct 23, 2015

Conversation

joelwurtz
Copy link
Member

I update the guzzle6 adapter to work with the new contract of Httplug, all tests are green.

For the sendRequests method after viewing the guzzle implementation and discussing it with @sagikazarmark on Slack, we concluded there was no real benefits to wrap the Guzzle object as it does not store requests, responses or exceptions objects.

"guzzlehttp/guzzle": "^6.0"
},
"require-dev": {
"ext-curl": "*",
"php-http/adapter-integration-tests": "^0.1"
"php-http/message-factory": "dev-master as 0.1.1",
Copy link
Member

Choose a reason for hiding this comment

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

Why is this necessary? WHere is it used?

Copy link
Member Author

Choose a reason for hiding this comment

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

Was used by the test which need discovery service, which need message factory

try {
return $this->client->send($request, $options);
return $this->client->send($request, $this->options);
Copy link
Member

Choose a reason for hiding this comment

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

These options can also be configure in Guzzle at construction time, can't they? If so, we should just wrap the client and forget about options.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes it's the same at the one in the construct of Guzzle, let's remove them.

sagikazarmark added a commit that referenced this pull request Oct 23, 2015
Update guzzle6 adapater with httplug new contract
@sagikazarmark sagikazarmark merged commit ed80bb0 into php-http:master Oct 23, 2015
@sagikazarmark
Copy link
Member

Thanks @joelwurtz

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

Successfully merging this pull request may close these issues.

2 participants