Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Carbon^3 #236

Merged
merged 3 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading