Skip to content

Commit 059a48f

Browse files
Supports Laravel 12 (#123)
* Allow Testbench 10 & PHPUnit 11 in composer.json * Add Laravel 12 to testing matrix * Update assertions against local filesystem config.
1 parent 719e408 commit 059a48f

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
php: [8.1, 8.2, 8.3]
16-
laravel: [10.*, 11.*]
16+
laravel: [10.*, 11.*, 12.*]
1717
stability: [prefer-lowest, prefer-stable]
1818
os: [ubuntu-latest]
1919
include:
@@ -28,6 +28,8 @@ jobs:
2828
exclude:
2929
- php: 8.1
3030
laravel: 11.*
31+
- php: 8.1
32+
laravel: 12.*
3133

3234
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
3335

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"require-dev": {
1010
"statamic/cms": "^5.0",
1111
"mockery/mockery": "^1.4.4",
12-
"orchestra/testbench": "^8.0 || ^9.0",
13-
"phpunit/phpunit": "^10.0"
12+
"orchestra/testbench": "^8.0 || ^9.0 || ^10.0",
13+
"phpunit/phpunit": "^10.0 || ^11.0"
1414
},
1515
"autoload": {
1616
"psr-4": {

tests/MigrateAssetContainerTest.php

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ public function it_migrates_disk_with_local_driver()
299299
300300
'local' => [
301301
'driver' => 'local',
302-
'root' => storage_path('app'),
302+
'root' => storage_path('app/private'),
303+
'serve' => true,
303304
'throw' => false,
304305
'report' => false,
305306
],
@@ -369,7 +370,8 @@ public function it_migrates_disk_with_s3_driver()
369370
370371
'local' => [
371372
'driver' => 'local',
372-
'root' => storage_path('app'),
373+
'root' => storage_path('app/private'),
374+
'serve' => true,
373375
'throw' => false,
374376
'report' => false,
375377
],
@@ -438,7 +440,8 @@ public function it_migrates_disk_with_terser_key_when_assets_already_exists()
438440
439441
'local' => [
440442
'driver' => 'local',
441-
'root' => storage_path('app'),
443+
'root' => storage_path('app/private'),
444+
'serve' => true,
442445
'throw' => false,
443446
'report' => false,
444447
],
@@ -513,7 +516,8 @@ public function it_migrates_multiple_disks_with_terser_keys_only()
513516
514517
'local' => [
515518
'driver' => 'local',
516-
'root' => storage_path('app'),
519+
'root' => storage_path('app/private'),
520+
'serve' => true,
517521
'throw' => false,
518522
'report' => false,
519523
],
@@ -619,7 +623,8 @@ public function it_overwrites_disks_when_forced()
619623
620624
'local' => [
621625
'driver' => 'local',
622-
'root' => storage_path('app'),
626+
'root' => storage_path('app/private'),
627+
'serve' => true,
623628
'throw' => false,
624629
'report' => false,
625630
],
@@ -797,11 +802,22 @@ protected function normalizeLocalConfig($config)
797802
],
798803
EOT;
799804

805+
// Up until Laravel 12
806+
$variants[] = <<<'EOT'
807+
'local' => [
808+
'driver' => 'local',
809+
'root' => storage_path('app'),
810+
'throw' => false,
811+
'report' => false,
812+
],
813+
EOT;
814+
800815
// Current version
801816
$current = <<<'EOT'
802817
'local' => [
803818
'driver' => 'local',
804-
'root' => storage_path('app'),
819+
'root' => storage_path('app/private'),
820+
'serve' => true,
805821
'throw' => false,
806822
'report' => false,
807823
],

0 commit comments

Comments
 (0)