From 30190f22f21e9d178f127361629edfae73ab9b8c Mon Sep 17 00:00:00 2001 From: Joao Gilberto Magalhaes Date: Mon, 16 Sep 2024 10:24:20 -0500 Subject: [PATCH] Upgrade breaking change from `byjg\webrequest` and `byjg\jwt-wrapper` --- docs/mock-requests.md | 6 +++--- src/AbstractRequester.php | 8 ++++---- src/ApiRequester.php | 8 ++++---- src/ApiTestCase.php | 2 +- src/MockRequester.php | 8 ++++---- tests/AbstractRequesterTest.php | 10 +++++----- tests/TestingTestCase.php | 14 +++++++------- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/mock-requests.md b/docs/mock-requests.md index 137aeb9..5d6b337 100644 --- a/docs/mock-requests.md +++ b/docs/mock-requests.md @@ -11,8 +11,8 @@ class MyTest extends ApiTestCase { public function testExpectOK() { - $expectedResponse = \ByJG\Util\Psr7\Response::getInstance(200) - ->withBody(new \ByJG\Util\Psr7\MemoryStream(json_encode([ + $expectedResponse = \ByJG\WebRequest\Psr7\Response::getInstance(200) + ->withBody(new \ByJG\WebRequest\Psr7\MemoryStream(json_encode([ "id" => 1, "name" => "Spike", "photoUrls" => [] @@ -39,7 +39,7 @@ e.g. ```php withMethod("GET") ->withBody('{"foo":"bar"}'); diff --git a/src/AbstractRequester.php b/src/AbstractRequester.php index 6d6c9e6..18ad4ad 100644 --- a/src/AbstractRequester.php +++ b/src/AbstractRequester.php @@ -12,11 +12,11 @@ use ByJG\ApiTools\Exception\PathNotFoundException; use ByJG\ApiTools\Exception\RequiredArgumentNotFound; use ByJG\ApiTools\Exception\StatusCodeNotMatchedException; -use ByJG\Util\Exception\MessageException; -use ByJG\Util\Exception\RequestException; -use ByJG\Util\Psr7\Request; +use ByJG\WebRequest\Exception\MessageException; +use ByJG\WebRequest\Exception\RequestException; +use ByJG\WebRequest\Psr7\Request; use ByJG\Util\Uri; -use ByJG\Util\Psr7\MemoryStream; +use ByJG\WebRequest\Psr7\MemoryStream; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; diff --git a/src/ApiRequester.php b/src/ApiRequester.php index cba891a..336883a 100644 --- a/src/ApiRequester.php +++ b/src/ApiRequester.php @@ -2,10 +2,10 @@ namespace ByJG\ApiTools; -use ByJG\Util\Exception\MessageException; -use ByJG\Util\Exception\NetworkException; -use ByJG\Util\Exception\RequestException; -use ByJG\Util\HttpClient; +use ByJG\WebRequest\Exception\MessageException; +use ByJG\WebRequest\Exception\NetworkException; +use ByJG\WebRequest\Exception\RequestException; +use ByJG\WebRequest\HttpClient; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; diff --git a/src/ApiTestCase.php b/src/ApiTestCase.php index 72e63b0..88e890c 100644 --- a/src/ApiTestCase.php +++ b/src/ApiTestCase.php @@ -12,7 +12,7 @@ use ByJG\ApiTools\Exception\PathNotFoundException; use ByJG\ApiTools\Exception\RequiredArgumentNotFound; use ByJG\ApiTools\Exception\StatusCodeNotMatchedException; -use ByJG\Util\Psr7\Response; +use ByJG\WebRequest\Psr7\Response; use PHPUnit\Framework\TestCase; use Psr\Http\Message\ResponseInterface; diff --git a/src/MockRequester.php b/src/MockRequester.php index e34e0c1..27d10d0 100644 --- a/src/MockRequester.php +++ b/src/MockRequester.php @@ -3,10 +3,10 @@ namespace ByJG\ApiTools; -use ByJG\Util\Exception\MessageException; -use ByJG\Util\Exception\RequestException; -use ByJG\Util\MockClient; -use ByJG\Util\Psr7\Response; +use ByJG\WebRequest\Exception\MessageException; +use ByJG\WebRequest\Exception\RequestException; +use ByJG\WebRequest\MockClient; +use ByJG\WebRequest\Psr7\Response; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; diff --git a/tests/AbstractRequesterTest.php b/tests/AbstractRequesterTest.php index e802e9e..0c4a1db 100644 --- a/tests/AbstractRequesterTest.php +++ b/tests/AbstractRequesterTest.php @@ -13,12 +13,12 @@ use ByJG\ApiTools\Exception\RequiredArgumentNotFound; use ByJG\ApiTools\Exception\StatusCodeNotMatchedException; use ByJG\ApiTools\MockRequester; -use ByJG\Util\Exception\MessageException; -use ByJG\Util\Exception\RequestException; -use ByJG\Util\Psr7\Request; -use ByJG\Util\Psr7\Response; +use ByJG\WebRequest\Exception\MessageException; +use ByJG\WebRequest\Exception\RequestException; +use ByJG\WebRequest\Psr7\Request; +use ByJG\WebRequest\Psr7\Response; use ByJG\Util\Uri; -use ByJG\Util\Psr7\MemoryStream; +use ByJG\WebRequest\Psr7\MemoryStream; abstract class AbstractRequesterTest extends ApiTestCase { diff --git a/tests/TestingTestCase.php b/tests/TestingTestCase.php index 208bf5d..ddfa8b6 100644 --- a/tests/TestingTestCase.php +++ b/tests/TestingTestCase.php @@ -14,14 +14,14 @@ use ByJG\ApiTools\Exception\RequiredArgumentNotFound; use ByJG\ApiTools\Exception\StatusCodeNotMatchedException; use ByJG\ApiTools\MockRequester; -use ByJG\Util\Exception\MessageException; -use ByJG\Util\Exception\RequestException; -use ByJG\Util\Helper\RequestMultiPart; -use ByJG\Util\MultiPartItem; -use ByJG\Util\Psr7\Request; -use ByJG\Util\Psr7\Response; +use ByJG\WebRequest\Exception\MessageException; +use ByJG\WebRequest\Exception\RequestException; +use ByJG\WebRequest\Helper\RequestMultiPart; +use ByJG\WebRequest\MultiPartItem; +use ByJG\WebRequest\Psr7\Request; +use ByJG\WebRequest\Psr7\Response; use ByJG\Util\Uri; -use ByJG\Util\Psr7\MemoryStream; +use ByJG\WebRequest\Psr7\MemoryStream; /** * Class TestingTestCase