Skip to content

Commit 467aa81

Browse files
Laravel 11.x Compatibility (#71)
* Bump dependencies for Laravel 11 * Update GitHub Actions for Laravel 11 * swap to pest --------- Co-authored-by: Michael Dyrynda <[email protected]>
1 parent a857578 commit 467aa81

File tree

6 files changed

+341
-299
lines changed

6 files changed

+341
-299
lines changed

.github/workflows/run-tests.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ on:
44
push:
55
pull_request:
66
schedule:
7-
- cron: "0 0 * * *"
7+
- cron: '0 0 * * *'
88

99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12+
1213
strategy:
1314
fail-fast: true
1415
matrix:
15-
php: [8.2, 8.1]
16-
laravel: [10.0]
16+
php: [8.3, 8.2, 8.1]
17+
laravel: [10.0, '11.0']
18+
exclude:
19+
- laravel: '11.0'
20+
php: 8.1
1721

1822
name: P${{ matrix.php }} - L${{ matrix.laravel }}
1923

@@ -23,7 +27,7 @@ jobs:
2327

2428
- name: Cache dependencies
2529
uses: actions/cache@v2
26-
with:
30+
with:
2731
path: ~/.composer/cache/files
2832
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
2933

@@ -40,4 +44,4 @@ jobs:
4044
composer update --prefer-dist --no-interaction --no-progress
4145
4246
- name: Execute tests
43-
run: vendor/bin/phpunit
47+
run: vendor/bin/pest

composer.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44
"type": "utility",
55
"require": {
66
"php": "^8.1",
7-
"illuminate/database": "^10.0",
8-
"illuminate/events": "^10.0"
9-
},
10-
"require-dev": {
11-
"phpunit/phpunit": "^9.6 || ^10.0"
7+
"illuminate/database": "^10.0 || ^11.0",
8+
"illuminate/events": "^10.0 || ^11.0"
129
},
1310
"autoload": {
1411
"psr-4": {
@@ -33,6 +30,13 @@
3330
"config": {
3431
"extra": {
3532
"sort-packages": true
33+
},
34+
"allow-plugins": {
35+
"pestphp/pest-plugin": true
3636
}
37+
},
38+
"require-dev": {
39+
"pestphp/pest": "^2.34",
40+
"pestphp/pest-plugin-drift": "^2.5"
3741
}
3842
}

phpunit.xml.dist

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" testdox="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3-
<coverage>
4-
<include>
5-
<directory suffix=".php">app/</directory>
6-
</include>
7-
</coverage>
8-
<testsuites>
9-
<testsuite name="Application Test Suite">
10-
<directory>./tests/</directory>
11-
</testsuite>
12-
</testsuites>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
>
7+
<testsuites>
8+
<testsuite name="Test Suite">
9+
<directory suffix="Test.php">./tests</directory>
10+
</testsuite>
11+
</testsuites>
12+
<source>
13+
<include>
14+
<directory suffix=".php">./src</directory>
15+
</include>
16+
</source>
1317
</phpunit>

0 commit comments

Comments
 (0)