diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1f8bc08..614d9b6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,11 +20,9 @@ jobs: matrix: os: [ ubuntu-latest, windows-latest ] php: [ 8.1, 8.2 ] - laravel: [ 9.*, 10.* ] + laravel: [ 10.* ] stability: [ prefer-lowest, prefer-stable ] include: - - laravel: 9.* - testbench: 7.* - laravel: 10.* testbench: 8.* diff --git a/composer.json b/composer.json index 2b7514b..262d51c 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "homepage": "https://github.com/sammyjo20", "require": { "php": "^8.1", - "illuminate/http": "^9.52 || ^10.0", + "illuminate/http": "^10.32", "saloonphp/saloon": "^3.0" }, "require-dev": { @@ -21,7 +21,7 @@ "pestphp/pest": "^1.23", "phpstan/phpstan": "^1.9", "spatie/ray": "^1.33", - "orchestra/testbench": "^7.30 || ^8.0" + "orchestra/testbench": "^8.0" }, "minimum-stability": "stable", "autoload": { @@ -46,4 +46,4 @@ "./vendor/bin/pest" ] } -} +} \ No newline at end of file diff --git a/src/HttpPendingRequest.php b/src/HttpPendingRequest.php index 722cec5..d2ba05f 100644 --- a/src/HttpPendingRequest.php +++ b/src/HttpPendingRequest.php @@ -14,6 +14,8 @@ class HttpPendingRequest extends PendingRequest { /** * Constructor + * + * @param array $middleware */ public function __construct(Factory $factory = null, $middleware = []) { diff --git a/src/HttpSender.php b/src/HttpSender.php index 7a6a7dd..ec0df8c 100644 --- a/src/HttpSender.php +++ b/src/HttpSender.php @@ -56,7 +56,7 @@ public function send(PendingRequest $pendingRequest): Response (string)$psrRequest->getUri(), $this->createRequestOptions($pendingRequest, $psrRequest), ); - } catch (ConnectionException|ConnectException $exception) { + } catch (ConnectionException | ConnectException $exception) { throw new FatalRequestException($exception, $pendingRequest); } @@ -171,10 +171,6 @@ protected function createLaravelPendingRequest(RequestInterface $psrRequest, boo /** @var Factory $httpFactory */ $httpFactory = resolve(Factory::class); - if (! $httpFactory->hasMacro('getGlobalMiddleware')) { - $httpFactory->macro('getGlobalMiddleware', fn () => $this->globalMiddleware ?? []); - } - $httpPendingRequest = new HttpPendingRequest($httpFactory, $httpFactory->getGlobalMiddleware()); $httpPendingRequest->setClient($this->client);