Skip to content

Commit

Permalink
Guzzle7
Browse files Browse the repository at this point in the history
  • Loading branch information
gladyshev committed Feb 20, 2021
1 parent d4631de commit f6d8b1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
"ext-json": "*",
"ext-mbstring": "*",
"ext-SimpleXML": "*",
"guzzlehttp/guzzle": "~6.2",
"psr/log": "~1.0"
"psr/http-client": "~1.0.0",
"psr/log": "~1.0.0",
"guzzlehttp/guzzle": "~7.2"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
Expand Down
8 changes: 2 additions & 6 deletions src/GenericClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@

namespace Rucaptcha;

use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\ClientInterface;
use Psr\Http\Client\ClientInterface;
use GuzzleHttp\RequestOptions;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Rucaptcha\Exception\ErrorResponseException;
use Rucaptcha\Exception\InvalidArgumentException;
use Rucaptcha\Exception\Exception;
use Rucaptcha\Exception\RuntimeException;
use SplFileObject;

Expand Down Expand Up @@ -160,8 +158,6 @@ public function recognize($content, array $extra = [])

return $result;
}

throw new RuntimeException('Unknown recognition logic error.');
}

/**
Expand Down Expand Up @@ -238,7 +234,7 @@ protected function getErrorMessage($responseText)
protected function getHttpClient()
{
if ($this->httpClient === null) {
$this->httpClient = new GuzzleClient([
$this->httpClient = new \GuzzleHttp\Client([
'base_uri' => $this->serverBaseUri
]);
}
Expand Down
2 changes: 1 addition & 1 deletion test/GenericClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\ClientInterface;
use Psr\Http\Client\ClientInterface;
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;
Expand Down

0 comments on commit f6d8b1e

Please sign in to comment.