Skip to content

Commit 0102a92

Browse files
authored
Support Laravel 12.x & PHP 8.4 (#494)
1 parent 0ff6ae6 commit 0102a92

File tree

5 files changed

+27
-63
lines changed

5 files changed

+27
-63
lines changed

.github/workflows/run-tests.yml

+10-17
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,18 @@ jobs:
1010
test:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
13-
fail-fast: true
13+
fail-fast: false
1414
matrix:
1515
os: [ubuntu-latest, windows-latest]
16-
php: [8.3, 8.2, 8.1]
17-
laravel: [11.*, 10.*]
16+
php: [8.4, 8.3, 8.2, 8.1]
17+
laravel: [12.*, 11.*, 10.*]
1818
stability: [prefer-lowest, prefer-stable]
19-
include:
20-
- laravel: 11.*
21-
testbench: 9.*
22-
carbon: ^3.2
23-
laravel-package-tools: ^1.16.4
24-
collision: ^8.1.1
25-
26-
- laravel: 10.*
27-
testbench: 8.*
28-
carbon: ^2.63
29-
laravel-package-tools: ^1.16.4
30-
collision: 7.*
3119

3220
exclude:
3321
- laravel: 11.*
3422
php: 8.1
23+
- laravel: 12.*
24+
php: 8.1
3525

3626
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
3727

@@ -53,11 +43,14 @@ jobs:
5343
5444
- name: Install dependencies
5545
run: |
56-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" "spatie/laravel-package-tools:${{ matrix.laravel-package-tools }}" "nunomaduro/collision:${{ matrix.collision }}" --no-interaction --no-update
46+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
5747
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
5848
5949
- name: List Installed Dependencies
60-
run: composer show -D
50+
run: composer show
51+
52+
# - name: Debug PhpUnit version
53+
# run: composer why phpunit/phpunit -t
6154

6255
- name: Execute tests
6356
run: vendor/bin/pest

composer.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@
3232
],
3333
"require": {
3434
"php": "^8.1",
35-
"illuminate/contracts": "^10.0|^11.0",
35+
"illuminate/contracts": "^10.0|^11.0|^12.0",
3636
"spatie/laravel-package-tools": "^1.16.4",
3737
"symfony/finder": "^6.2|^7.0"
3838
},
3939
"require-dev": {
4040
"guzzlehttp/guzzle": "^7.0",
41-
"larastan/larastan": "^2.0|^3.0",
4241
"laravel/pint": "^1.0",
43-
"nunomaduro/collision": "^7.9",
44-
"orchestra/testbench": "^8.0",
45-
"pestphp/pest": "^2.0",
46-
"pestphp/pest-plugin-arch": "^2.0",
47-
"pestphp/pest-plugin-laravel": "^2.0",
42+
"larastan/larastan": "^2.0|^3.1",
43+
"nunomaduro/collision": "^7.11|^8.1.1",
44+
"orchestra/testbench": "^8.0|^9.0|^10.0",
45+
"pestphp/pest": "^v2.30|^3.0",
46+
"pestphp/pest-plugin-arch": "^2.0|^3.0",
47+
"pestphp/pest-plugin-laravel": "^2.0|^3.1",
4848
"phpstan/extension-installer": "^1.1",
49-
"phpstan/phpstan-deprecation-rules": "^1.0",
50-
"phpstan/phpstan-phpunit": "^1.0",
49+
"phpstan/phpstan-deprecation-rules": "^1.0|^2.0",
50+
"phpstan/phpstan-phpunit": "^1.0|^2.0",
5151
"spatie/laravel-ray": "^1.26"
5252
},
5353
"autoload": {

phpstan.neon

+6-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ parameters:
99
# Level 9 is the highest level
1010
level: 5
1111

12+
13+
noEnvCallsOutsideOfConfig: false # Don't know why he doesn't consider our config/ directory as config
14+
1215
ignoreErrors:
1316
- '#Class App\\Providers\\NativeAppServiceProvider not found#'
1417
- '#Class Native\\Laravel\\ChildProcess has an uninitialized readonly property#'
1518

16-
#
17-
# excludePaths:
18-
# - ./*/*/FileToBeExcluded.php
19+
20+
excludePaths:
21+
- ./src/NativeServiceProvider.php

src/Commands/LoadPHPConfigurationCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public function handle()
1414
/** @var ProvidesPhpIni $provider */
1515
$provider = app(config('nativephp.provider'));
1616
$phpIni = [];
17+
18+
/* * @phpstan-ignore-next-line */
1719
if (method_exists($provider, 'phpIni')) {
1820
$phpIni = $provider->phpIni();
1921
}

src/Concerns/InteractsWithNativeApp.php

-34
This file was deleted.

0 commit comments

Comments
 (0)