Skip to content

Commit f24ee4f

Browse files
committed
Add Laravel 13 support
Builds on the Laravel 12 work (#1366). Bumps laravel/framework ^12 -> ^13 and PHP ^8.2 -> ^8.3 in the root and modules/{system,backend,cms}. Points winter/storm and the three modules at the Laravel 13 branch (dev-wip/1.3-laravel-13). Adds path repositories for the in-repo modules so composer resolves the Laravel 13 module manifests locally (the published split packages still pin Laravel 12), and a VCS repository for the Storm Laravel 13 branch. CI matrices dropped to PHP 8.3/8.4. No module code changes were required (all system/backend/cms suites pass on Laravel 13).
1 parent 471e7eb commit f24ee4f

7 files changed

Lines changed: 40 additions & 18 deletions

File tree

.github/workflows/code-quality.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install PHP and PHP Code Sniffer
2727
uses: shivammathur/setup-php@v2
2828
with:
29-
php-version: 8.2
29+
php-version: 8.3
3030
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
3131
tools: phpcs
3232

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install PHP
3030
uses: shivammathur/setup-php@v2
3131
with:
32-
php-version: 8.2
32+
php-version: 8.3
3333
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
3434

3535
- name: Install Node
@@ -66,7 +66,7 @@ jobs:
6666
max-parallel: 8
6767
matrix:
6868
operatingSystem: [ubuntu-latest, windows-latest]
69-
phpVersion: ['8.2', '8.3', '8.4']
69+
phpVersion: ['8.3', '8.4']
7070
fail-fast: false
7171
runs-on: ${{ matrix.operatingSystem }}
7272
name: ${{ matrix.operatingSystem }} / PHP ${{ matrix.phpVersion }}

composer.json

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
"source": "https://github.com/wintercms/winter"
3030
},
3131
"require": {
32-
"php": "^8.2",
33-
"winter/storm": "dev-wip/1.3 as 1.3",
34-
"winter/wn-system-module": "dev-wip/1.3",
35-
"winter/wn-backend-module": "dev-wip/1.3",
36-
"winter/wn-cms-module": "dev-wip/1.3",
37-
"laravel/framework": "^12.0",
32+
"php": "^8.3",
33+
"winter/storm": "dev-wip/1.3-laravel-13 as 1.3",
34+
"winter/wn-system-module": "dev-wip/1.3-laravel-13",
35+
"winter/wn-backend-module": "dev-wip/1.3-laravel-13",
36+
"winter/wn-cms-module": "dev-wip/1.3-laravel-13",
37+
"laravel/framework": "^13.0",
3838
"wikimedia/composer-merge-plugin": "~2.1.0"
3939
},
4040
"require-dev": {
@@ -48,7 +48,28 @@
4848
"repositories": [
4949
{
5050
"type": "vcs",
51-
"url": "https://github.com/pieterocp/phpunit-arraysubset-asserts"
51+
"url": "https://github.com/austinderrick/storm",
52+
"no-api": true
53+
},
54+
{
55+
"type": "path",
56+
"url": "modules/system",
57+
"options": { "symlink": true }
58+
},
59+
{
60+
"type": "path",
61+
"url": "modules/backend",
62+
"options": { "symlink": true }
63+
},
64+
{
65+
"type": "path",
66+
"url": "modules/cms",
67+
"options": { "symlink": true }
68+
},
69+
{
70+
"type": "vcs",
71+
"url": "https://github.com/pieterocp/phpunit-arraysubset-asserts",
72+
"no-api": true
5273
}
5374
],
5475
"scripts": {

modules/backend/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^8.2",
26+
"php": "^8.3",
2727
"composer/installers": "~1.11.0",
28-
"laravel/framework": "^12.0"
28+
"laravel/framework": "^13.0"
2929
},
3030
"replace": {
3131
"october/backend": "1.1.*"

modules/cms/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^8.2",
26+
"php": "^8.3",
2727
"composer/installers": "~1.11.0",
28-
"laravel/framework": "^12.0"
28+
"laravel/framework": "^13.0"
2929
},
3030
"replace": {
3131
"october/cms": "1.1.*"

modules/system/classes/VersionManager.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Console\View\Components\Info;
99
use Illuminate\Console\View\Components\Task;
1010
use Winter\Storm\Database\Updater;
11+
use Winter\Storm\Support\Arr;
1112

1213
/**
1314
* Version manager
@@ -715,9 +716,9 @@ public function getCurrentVersionNote($plugin): string
715716
{
716717
$code = $this->pluginManager->getIdentifier($plugin);
717718
$histories = $this->getDatabaseHistory($code);
718-
$lastHistory = array_last(array_where($histories, function ($history) {
719+
$lastHistory = Arr::last($histories, function ($history) {
719720
return $history->type === self::HISTORY_TYPE_COMMENT;
720-
}));
721+
});
721722
return $lastHistory ? $lastHistory->detail : '';
722723
}
723724
}

modules/system/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^8.2",
26+
"php": "^8.3",
2727
"composer/installers": "~1.11.0",
28-
"laravel/framework": "^12.0",
28+
"laravel/framework": "^13.0",
2929
"composer/semver": "^3.2"
3030
},
3131
"replace": {

0 commit comments

Comments
 (0)