Skip to content

Commit fb1a73a

Browse files
Add Laravel 11 to Github CI test
Removed support for Laravel 8 and Laravel 9
1 parent 59b1fc6 commit fb1a73a

File tree

6 files changed

+32
-40
lines changed

6 files changed

+32
-40
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,19 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php: [ 8.1, 8.2 ]
17-
laravel: [ 8.*, 9.*, 10.* ]
16+
php: [ 8.1, 8.2, 8.3 ]
17+
laravel: [ 10.*, 11.* ]
1818
stability: [ prefer-stable ]
1919
experimental: [ false ]
2020
include:
21-
- laravel: 8.*
22-
testbench: 6.*
23-
- laravel: 9.*
24-
testbench: 7.*
2521
- laravel: 10.*
2622
testbench: 8.*
27-
- php: 8.3
28-
laravel: 10.*
29-
testbench: 8.*
30-
stability: prefer-stable
31-
experimental: true
23+
- laravel: 11.*
24+
testbench: 9.*
25+
exclude:
26+
- php: 8.1
27+
laravel: 11.*
28+
3229

3330
name: PHP ${{ matrix.php }} - L${{ matrix.laravel }}
3431
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/vendor/
2+
/.phpunit.cache
23
composer.lock

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@
3333
"php": ">=8.1",
3434
"jumbojett/openid-connect-php": "^1.0.0",
3535
"guzzlehttp/guzzle": "^7.5",
36+
"illuminate/contracts": "^10.0||^11.0",
3637
"web-token/jwt-library": "^3.4"
3738
},
3839
"require-dev": {
39-
"orchestra/testbench": "^6.0|^7.0|^8.0",
40-
"phpunit/phpunit": "^9.6",
40+
"orchestra/testbench": "^8.0||^9.0",
41+
"phpunit/phpunit": "^10.0",
4142
"vimeo/psalm": "^5.8",
4243
"phpstan/phpstan": "^1.10",
4344
"squizlabs/php_codesniffer": "^3.8",

phpunit.xml.dist

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
bootstrap="vendor/autoload.php"
5-
backupGlobals="false"
6-
backupStaticAttributes="false"
7-
colors="true"
8-
verbose="true"
9-
convertErrorsToExceptions="true"
10-
convertNoticesToExceptions="true"
11-
convertWarningsToExceptions="true"
12-
processIsolation="false"
13-
stopOnFailure="false"
14-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
15-
>
16-
<coverage>
17-
<include>
18-
<directory suffix=".php">src/</directory>
19-
</include>
20-
</coverage>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
bootstrap="vendor/autoload.php"
4+
backupGlobals="false"
5+
colors="true"
6+
processIsolation="false"
7+
stopOnFailure="false"
8+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
9+
cacheDirectory=".phpunit.cache"
10+
backupStaticProperties="false">
2111
<testsuites>
2212
<testsuite name="Unit">
2313
<directory suffix="Test.php">./tests/Unit</directory>
@@ -30,4 +20,9 @@
3020
<env name="DB_CONNECTION" value="testing"/>
3121
<env name="APP_KEY" value="base64:dTE5YzljdWRsc292a2x3ZXRjeWg2ZWxrYm1mZnI4a3c="/>
3222
</php>
33-
</phpunit>
23+
<source>
24+
<include>
25+
<directory suffix=".php">src/</directory>
26+
</include>
27+
</source>
28+
</phpunit>

tests/Feature/Http/Controllers/LoginControllerResponseTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use MinVWS\OpenIDConnectLaravel\OpenIDConfiguration\OpenIDConfigurationLoader;
1414
use MinVWS\OpenIDConnectLaravel\Tests\TestCase;
1515
use Mockery;
16+
use PHPUnit\Framework\Attributes\DataProvider;
1617

1718
use function MinVWS\OpenIDConnectLaravel\Tests\generateJwt;
1819

@@ -82,9 +83,7 @@ public function testNonceAndStateAreSetInCache(): void
8283
->assertRedirectContains('client_id=test-client-id');
8384
}
8485

85-
/**
86-
* @dataProvider codeChallengeMethodProvider
87-
*/
86+
#[DataProvider('codeChallengeMethodProvider')]
8887
public function testCodeChallengeIsSetWhenSupported(
8988
?string $requestedCodeChallengeMethod,
9089
array $codeChallengesSupportedAtProvider,
@@ -114,7 +113,7 @@ public function testCodeChallengeIsSetWhenSupported(
114113
}
115114
}
116115

117-
public function codeChallengeMethodProvider(): array
116+
public static function codeChallengeMethodProvider(): array
118117
{
119118
return [
120119
'no code challenge method requested' => [null, [], false],

tests/Feature/Http/Controllers/LoginControllerTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use MinVWS\OpenIDConnectLaravel\OpenIDConnectClient;
1111
use MinVWS\OpenIDConnectLaravel\Tests\TestCase;
1212
use Mockery;
13+
use PHPUnit\Framework\Attributes\DataProvider;
1314

1415
class LoginControllerTest extends TestCase
1516
{
@@ -40,9 +41,7 @@ public function testLoginRouteRedirectsToAuthorizeUrlOfProvider(): void
4041
->assertRedirectContains('code_challenge_method=S256');
4142
}
4243

43-
/**
44-
* @dataProvider scopesProvider
45-
*/
44+
#[DataProvider('scopesProvider')]
4645
public function testLoginRouteRedirectsToAuthorizeUrlOfProviderWithScopes(
4746
array $additionalScopes,
4847
string $scopeInUrl

0 commit comments

Comments
 (0)