Skip to content

Commit

Permalink
UPDATE ValidateSignature middleware (#6)
Browse files Browse the repository at this point in the history
FIX ValidateSignature middleware
  • Loading branch information
Riccardo Dalla Via committed May 15, 2023
1 parent a8c0237 commit 2d3d36f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
13 changes: 2 additions & 11 deletions src/Http/Middleware/ValidateSignature.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 2d3d36f

Please sign in to comment.