Skip to content

Commit 1bf33f4

Browse files
feat: PHP 8.4 and Laravel 12 support (#61)
* Update GitHub Actions for Laravel 12 * Bump dependencies for Laravel 12 * ci: Prefer stable "illuminate/contracts" package * ci: Use major version of PHPUnit to conditionally execute tests * ci: Added PHP 8.4 test matrix support --------- Co-authored-by: Shift <shift@laravelshift.com>
1 parent aa687e4 commit 1bf33f4

File tree

2 files changed

+32
-16
lines changed

2 files changed

+32
-16
lines changed

.github/workflows/tests.yaml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
php: [7.4, 8.0, 8.1, 8.2, 8.3]
15-
laravel: ['6.*', '7.*', '8.*', '9.*', '10.*', '11.*']
14+
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
15+
laravel: ['6.*', '7.*', '8.*', '9.*', '10.*', '11.*', '12.*']
1616
exclude:
17+
- php: 7.4
18+
laravel: 12.*
19+
- php: 8.0
20+
laravel: 12.*
21+
- php: 8.1
22+
laravel: 12.*
1723
- php: 7.4
1824
laravel: 11.*
1925
- php: 8.0
@@ -24,26 +30,36 @@ jobs:
2430
laravel: 10.*
2531
- php: 8.0
2632
laravel: 10.*
33+
- php: 8.4
34+
laravel: 10.*
2735
- php: 7.4
2836
laravel: 9.*
2937
- php: 8.3
3038
laravel: 9.*
39+
- php: 8.4
40+
laravel: 9.*
3141
- php: 8.2
3242
laravel: 8.*
3343
- php: 8.3
3444
laravel: 8.*
45+
- php: 8.4
46+
laravel: 8.*
3547
- php: 8.1
3648
laravel: 7.*
3749
- php: 8.2
3850
laravel: 7.*
3951
- php: 8.3
4052
laravel: 7.*
53+
- php: 8.4
54+
laravel: 7.*
4155
- php: 8.1
4256
laravel: 6.*
4357
- php: 8.2
4458
laravel: 6.*
4559
- php: 8.3
4660
laravel: 6.*
61+
- php: 8.4
62+
laravel: 6.*
4763

4864
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
4965

@@ -60,17 +76,17 @@ jobs:
6076

6177
- name: Install dependencies
6278
run: |
63-
composer require "illuminate/contracts=${{ matrix.laravel }}" --no-update
79+
composer require "illuminate/contracts=${{ matrix.laravel }}" --prefer-stable --no-update
6480
composer update --prefer-dist --no-interaction --no-progress
6581
66-
- name: Grab PHPUnit version
82+
- name: Grab PHPUnit major version
6783
id: phpunit_version
68-
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT
84+
run: echo "MAJOR_VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+' | cut -d '.' -f 1)" >> $GITHUB_OUTPUT
6985

70-
- name: Execute tests (PHPUnit 10)
71-
if: ${{ startsWith(steps.phpunit_version.outputs.VERSION, '10.') }}
86+
- name: Execute tests (PHPUnit >= 10)
87+
if: "${{ fromJSON(steps.phpunit_version.outputs.MAJOR_VERSION) >= 10 }}"
7288
run: vendor/bin/phpunit --configuration=phpunit10.xml.dist
7389

7490
- name: Execute tests (PHPUnit < 10)
75-
if: ${{ !startsWith(steps.phpunit_version.outputs.VERSION, '10.') }}
91+
if: "${{ fromJSON(steps.phpunit_version.outputs.MAJOR_VERSION) < 10 }}"
7692
run: vendor/bin/phpunit --configuration=phpunit.xml.dist

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717
"require": {
1818
"php": ">=7.4|^8.0",
1919
"guzzlehttp/guzzle": "^7.0",
20-
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
21-
"illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
22-
"illuminate/bus": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
23-
"illuminate/mail": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
24-
"illuminate/queue": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
25-
"illuminate/notifications": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
20+
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
21+
"illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
22+
"illuminate/bus": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
23+
"illuminate/mail": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
24+
"illuminate/queue": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
25+
"illuminate/notifications": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
2626
"ext-json": "*",
2727
"enlightn/security-checker": "^1.3|^2.0"
2828
},
2929
"require-dev": {
3030
"laravel/slack-notification-channel": "^1.0|^2.0|^3.2",
31-
"phpunit/phpunit": "^6.0|^7.0|^8.0|^9.0|^10.5",
31+
"phpunit/phpunit": "^6.0|^7.0|^8.0|^9.0|^10.5|^11.5.3",
3232
"squizlabs/php_codesniffer": "~2.3|^3.6",
33-
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0",
33+
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0|^10.0",
3434
"mockery/mockery": "^1.2"
3535
},
3636
"suggest": {

0 commit comments

Comments
 (0)