Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Laravel 11 support was recently added via #233
Laravel 11 supports both carbon 2 & 3, see https://github.com/laravel/framework/blob/ae2f9413b5bd8637c363e6fafffda31c88e56c9e/composer.json#L39
However, projects running Laravel 11 and also requiring carbon:^3 (or have other dependencies requiring it), cannot install jwt-auth because we still only support carbon^2.
This PR fixes that, see also #230 (comment)
Overview of changes
Runs tests on 8.3 too
Remove carbon^1
There was no constellation possible which actually used it. Even Laravel 6 with
prefer-lowest
did install carbon^2, see any random run, e.g. https://github.com/PHP-Open-Source-Saver/jwt-auth/actions/runs/8252381702/job/22571741990#step:11:34Add support for carbon^3
Carbon 3 has some breaking changes and one of them affected the Method
diffInRealMinutes
we call from\PHPOpenSourceSaver\JWTAuth\Blacklist::getMinutesUntilExpired
-2…
.9…
The change using
round()
and adding a 2nd argtrue
keeps the code BC.Without the fix, tests in
\PHPOpenSourceSaver\JWTAuth\Test\BlacklistTest
would fail