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

Remove sendRequests method #7

Merged
merged 1 commit into from
Oct 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
],
"require": {
"php": ">=5.5.0",
"php-http/httplug": "^1.0@dev",
"php-http/utils": "^0.1@dev",
"php-http/httplug": "^1.0",
Copy link
Member

Choose a reason for hiding this comment

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

This won't work, since it is not stable yet.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, I am not sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

It works because we have the minimum stability and prefere stable option in composer.json

"guzzlehttp/guzzle": "^6.0"
},
"require-dev": {
Expand Down
25 changes: 0 additions & 25 deletions src/Guzzle6HttpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,6 @@ public function sendRequest(RequestInterface $request)
}
}

/**
* {@inheritdoc}
*/
public function sendRequests(array $requests)
{
$poolResult = Pool::batch($this->client, $requests);
$batchResult = new BatchResult();

foreach ($poolResult as $index => $result) {
if ($result instanceof ResponseInterface) {
$batchResult = $batchResult->addResponse($requests[$index], $result);
}

if ($result instanceof RequestException) {
$batchResult = $batchResult->addException($requests[$index], $this->createException($result));
}
}

if ($batchResult->hasExceptions()) {
throw new BatchException($batchResult);
}

return $batchResult;
}

/**
* Converts a Guzzle exception into an Httplug exception
*
Expand Down