Skip to content

Commit

Permalink
Merge pull request #238 from mfn/mfn-drop-L9
Browse files Browse the repository at this point in the history
Drop support for Laravel < 10

On this weekend I'll release it.
  • Loading branch information
Messhias authored Mar 19, 2024
2 parents 195bd0c + a81224f commit de4b752
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.3
coverage: none

- name: Determine composer cache directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.3
coverage: none

- name: Get composer cache directory
Expand Down
63 changes: 2 additions & 61 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,78 +15,20 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.4, 8.0, 8.1, 8.2, 8.3]
laravel: [6.*, 7.*, 8.*, 9.*, 10.*, 11.*]
php: [8.1, 8.2, 8.3]
laravel: [10.*, 11.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
coverage: [none]
exclude:
- laravel: 6.*
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.*
php: 8.0
- laravel: 11.*
php: 7.4
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1
include:
- laravel: 6.*
dotenv: ^3.3

- laravel: 7.*
dotenv: ^4.0

- laravel: 8.*
dotenv: ^5.2

- laravel: 9.*
dotenv: ^5.2

- laravel: 10.*
dotenv: ^5.4.1

- laravel: 11.*
dotenv: ^5.4.1

- php: 8.0
laravel: 9.*
stability: prefer-stable
os: ubuntu-latest
coverage: xdebug
dotenv: ^5.2

- php: 8.1
laravel: 10.*
stability: prefer-stable
os: ubuntu-latest
coverage: xdebug
dotenv: ^5.4.1

name: '[PHP ${{ matrix.php }}] [Laravel ${{ matrix.laravel }} - ${{ matrix.stability }}] [${{ matrix.coverage }} coverage]'

Expand Down Expand Up @@ -122,7 +64,6 @@ jobs:
- name: Set Minimum Laravel ${{ matrix.laravel }} Versions
run: |
composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-progress --no-update
composer require "vlucas/phpdotenv:${{ matrix.dotenv }}" --no-interaction --no-progress --no-update --dev
- name: Cache dependencies
uses: actions/cache@v4
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ You can find and compare releases at the GitHub release page.

## [Unreleased]

### Added
- Support for Carbon 3 (and drop Carbon 1, but it was unused anyway)

### Removed
- Dropped support for Laravel < 10 and PHP < 8.1

## [2.2.0] 2024-03-12

### Added
- Different TTL configurations for each guard
- lcobucci/jwt: add array support for `aud` claim
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This uses different namespace, then `tymondesigns/jwt-auth`, but overall, provid

### Notes

Due to new features, added in our library, there are some incompatibilities. _This won't hurt you in most cases_, unless you have [implicitly disabled autodiscovery](https://laravel.com/docs/8.x/packages#opting-out-of-package-discovery) for original Tymon's package.
Due to new features, added in our library, there are some incompatibilities. _This won't hurt you in most cases_, unless you have [implicitly disabled autodiscovery](https://laravel.com/docs/11.x/packages#opting-out-of-package-discovery) for original Tymon's package.

Current compatability breaks:
- [`JWTGuard`](src/JWTGuard.php) have new required constructor parameter [`$eventDispatcher`](src/Providers/AbstractServiceProvider.php#L97)
Expand Down
20 changes: 9 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,24 @@
}
],
"require": {
"php": "^7.4|^8.0",
"php": "^8.1",
"ext-json": "*",
"illuminate/auth": "^6|^7|^8.67|^9|^10|^11",
"illuminate/contracts": "^6|^7|^8.67|^9|^10|^11",
"illuminate/http": "^6|^7|^8.67|^9|^10|^11",
"illuminate/support": "^6|^7|^8.67|^9|^10|^11",
"illuminate/auth": "^10|^11",
"illuminate/contracts": "^10|^11",
"illuminate/http": "^10|^11",
"illuminate/support": "^10|^11",
"lcobucci/jwt": "^4.0",
"namshi/jose": "^7.0",
"nesbot/carbon": "^2.0|^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3",
"illuminate/console": "^6|^7|^8.67|^9|^10|^11",
"illuminate/routing": "^6|^7|^8.67|^9|^10|^11",
"orchestra/testbench": "^4.18|^5.8|^6.3|^7|^8|^9|9.x-dev",
"illuminate/console": "^10|^11",
"illuminate/routing": "^10|^11",
"orchestra/testbench": "^8|^9",
"mockery/mockery": "^1.4.4",
"phpstan/phpstan": "^1",
"phpunit/phpunit": "^8.5|^9.4|^10",
"vlucas/phpdotenv": "^5.2.0",
"yoast/phpunit-polyfills": "^2.0.0"
"phpunit/phpunit": "^9.4|^10"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 5 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ parameters:
count: 1
path: tests/Stubs/LaravelUserStub.php

-
message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getAuthPasswordName\\(\\) should return string but return statement is missing\\.$#"
count: 1
path: tests/Stubs/LaravelUserStub.php

-
message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getRememberToken\\(\\) should return string but return statement is missing\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace PHPOpenSourceSaver\JWTAuth\Test;

use Carbon\Carbon;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
use PHPUnit\Framework\TestCase;

abstract class AbstractTestCase extends TestCase
{
Expand Down

0 comments on commit de4b752

Please sign in to comment.