Skip to content

Commit

Permalink
Merge pull request #236 from mfn/mfn-carbon-3
Browse files Browse the repository at this point in the history
Add support for Carbon^3
  • Loading branch information
Messhias authored Mar 17, 2024
2 parents 79391c0 + ae04793 commit 41e6a74
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.4, 8.0, 8.1, 8.2]
php: [7.4, 8.0, 8.1, 8.2, 8.3]
laravel: [6.*, 7.*, 8.*, 9.*, 10.*, 11.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
Expand All @@ -25,18 +25,26 @@ jobs:
php: 8.1
- laravel: 6.*
php: 8.2
- laravel: 6.*
php: 8.3
- laravel: 7.*
php: 8.1
- laravel: 7.*
php: 8.2
- laravel: 7.*
php: 8.3
- laravel: 8.*
php: 8.2
stability: prefer-lowest
- laravel: 8.*
php: 8.3
- laravel: 9.*
php: 7.4
- laravel: 9.*
php: 8.2
stability: prefer-lowest
- laravel: 9.*
php: 8.3
- laravel: 10.*
php: 7.4
- laravel: 10.*
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"illuminate/support": "^6|^7|^8.67|^9|^10|^11",
"lcobucci/jwt": "^4.0",
"namshi/jose": "^7.0",
"nesbot/carbon": "^1.0|^2.0"
"nesbot/carbon": "^2.0|^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3",
Expand Down
2 changes: 1 addition & 1 deletion src/Blacklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function getMinutesUntilExpired(Payload $payload)
// get the latter of the two expiration dates and find
// the number of minutes until the expiration date,
// plus 1 minute to avoid overlap
return $exp->max($iat->addMinutes($this->refreshTTL))->addMinute()->diffInRealMinutes();
return round($exp->max($iat->addMinutes($this->refreshTTL))->addMinute()->diffInRealMinutes(null, true));
}

/**
Expand Down

0 comments on commit 41e6a74

Please sign in to comment.