From 2d3d36fc4492f019d9b0bbd6f9a561ec2c5b1b61 Mon Sep 17 00:00:00 2001 From: Riccardo Dalla Via Date: Mon, 15 May 2023 16:04:11 +0200 Subject: [PATCH] UPDATE ValidateSignature middleware (#6) FIX ValidateSignature middleware --- .github/workflows/run-tests.yml | 5 +---- composer.json | 10 +++++----- src/Http/Middleware/ValidateSignature.php | 13 ++----------- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e569c77..57152e1 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,15 +14,12 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] php: [8.2, 8.1] - laravel: [10.*, 9.*] + laravel: [10.*] stability: [prefer-lowest, prefer-stable] include: - laravel: 10.* testbench: 8.* carbon: ^2.63 - - laravel: 9.* - testbench: 7.* - carbon: ^2.63 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index 93db0b6..1455126 100644 --- a/composer.json +++ b/composer.json @@ -21,11 +21,11 @@ ], "require": { "php": "^8.1", - "illuminate/contracts": "^9.30.1|^10.0", - "illuminate/database": "^9.30.1|^10.0", - "illuminate/http": "^9.30.1|^10.0", - "illuminate/routing": "^9.30.1|^10.0", - "illuminate/support": "^9.30.1|^10.0", + "illuminate/contracts": "^10.10.1", + "illuminate/database": "^10.10.1", + "illuminate/http": "^10.10.1", + "illuminate/routing": "^10.10.1", + "illuminate/support": "^10.10.1", "spatie/laravel-package-tools": "^1.14.1" }, "require-dev": { diff --git a/src/Http/Middleware/ValidateSignature.php b/src/Http/Middleware/ValidateSignature.php index 77e3d9f..6389d0e 100644 --- a/src/Http/Middleware/ValidateSignature.php +++ b/src/Http/Middleware/ValidateSignature.php @@ -9,19 +9,10 @@ class ValidateSignature extends BaseValidateSignature { - /** - * Handle an incoming request. - * - * @param \Illuminate\Http\Request $request - * @param string|null $relative - * @return \Illuminate\Http\Response - * - * @throws \Illuminate\Routing\Exceptions\InvalidSignatureException - */ - public function handle($request, Closure $next, $relative = null) + public function handle($request, Closure $next, ...$args) { try { - return parent::handle($request, $next, $relative); + return parent::handle($request, $next, ...$args); } catch (InvalidSignatureException $e) { throw Config::getException(); }