From c9c1ba419372f404417faf7d86ed26eacdf7ab98 Mon Sep 17 00:00:00 2001 From: Derrick Austin Date: Mon, 1 Jun 2026 18:35:49 -0500 Subject: [PATCH] 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). --- .github/workflows/code-quality.yaml | 2 +- .github/workflows/tests.yml | 4 +-- composer.json | 35 ++++++++++++++++++----- modules/backend/composer.json | 4 +-- modules/cms/composer.json | 4 +-- modules/system/classes/VersionManager.php | 5 ++-- modules/system/composer.json | 4 +-- 7 files changed, 40 insertions(+), 18 deletions(-) diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml index 1147541209..f27f2ae823 100644 --- a/.github/workflows/code-quality.yaml +++ b/.github/workflows/code-quality.yaml @@ -26,7 +26,7 @@ jobs: - name: Install PHP and PHP Code Sniffer uses: shivammathur/setup-php@v2 with: - php-version: 8.2 + php-version: 8.3 extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip tools: phpcs diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ae6e66d89e..0800396845 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,7 +29,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.2 + php-version: 8.3 extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip - name: Install Node @@ -66,7 +66,7 @@ jobs: max-parallel: 8 matrix: operatingSystem: [ubuntu-latest, windows-latest] - phpVersion: ['8.2', '8.3', '8.4'] + phpVersion: ['8.3', '8.4'] fail-fast: false runs-on: ${{ matrix.operatingSystem }} name: ${{ matrix.operatingSystem }} / PHP ${{ matrix.phpVersion }} diff --git a/composer.json b/composer.json index 49915a8696..ad280a3628 100644 --- a/composer.json +++ b/composer.json @@ -29,12 +29,12 @@ "source": "https://github.com/wintercms/winter" }, "require": { - "php": "^8.2", - "winter/storm": "dev-wip/1.3 as 1.3", - "winter/wn-system-module": "dev-wip/1.3", - "winter/wn-backend-module": "dev-wip/1.3", - "winter/wn-cms-module": "dev-wip/1.3", - "laravel/framework": "^12.0", + "php": "^8.3", + "winter/storm": "dev-wip/1.3-laravel-13 as 1.3", + "winter/wn-system-module": "dev-wip/1.3-laravel-13", + "winter/wn-backend-module": "dev-wip/1.3-laravel-13", + "winter/wn-cms-module": "dev-wip/1.3-laravel-13", + "laravel/framework": "^13.0", "wikimedia/composer-merge-plugin": "~2.1.0" }, "require-dev": { @@ -48,7 +48,28 @@ "repositories": [ { "type": "vcs", - "url": "https://github.com/pieterocp/phpunit-arraysubset-asserts" + "url": "https://github.com/austinderrick/storm", + "no-api": true + }, + { + "type": "path", + "url": "modules/system", + "options": { "symlink": true, "versions": { "winter/wn-system-module": "dev-wip/1.3-laravel-13" } } + }, + { + "type": "path", + "url": "modules/backend", + "options": { "symlink": true, "versions": { "winter/wn-backend-module": "dev-wip/1.3-laravel-13" } } + }, + { + "type": "path", + "url": "modules/cms", + "options": { "symlink": true, "versions": { "winter/wn-cms-module": "dev-wip/1.3-laravel-13" } } + }, + { + "type": "vcs", + "url": "https://github.com/pieterocp/phpunit-arraysubset-asserts", + "no-api": true } ], "scripts": { diff --git a/modules/backend/composer.json b/modules/backend/composer.json index bb0d6050f7..6f77631b56 100644 --- a/modules/backend/composer.json +++ b/modules/backend/composer.json @@ -23,9 +23,9 @@ } ], "require": { - "php": "^8.2", + "php": "^8.3", "composer/installers": "~1.11.0", - "laravel/framework": "^12.0" + "laravel/framework": "^13.0" }, "replace": { "october/backend": "1.1.*" diff --git a/modules/cms/composer.json b/modules/cms/composer.json index 6e59532759..5706dc14c8 100644 --- a/modules/cms/composer.json +++ b/modules/cms/composer.json @@ -23,9 +23,9 @@ } ], "require": { - "php": "^8.2", + "php": "^8.3", "composer/installers": "~1.11.0", - "laravel/framework": "^12.0" + "laravel/framework": "^13.0" }, "replace": { "october/cms": "1.1.*" diff --git a/modules/system/classes/VersionManager.php b/modules/system/classes/VersionManager.php index ea2e7735a9..3e00995dfa 100644 --- a/modules/system/classes/VersionManager.php +++ b/modules/system/classes/VersionManager.php @@ -8,6 +8,7 @@ use Illuminate\Console\View\Components\Info; use Illuminate\Console\View\Components\Task; use Winter\Storm\Database\Updater; +use Winter\Storm\Support\Arr; /** * Version manager @@ -715,9 +716,9 @@ public function getCurrentVersionNote($plugin): string { $code = $this->pluginManager->getIdentifier($plugin); $histories = $this->getDatabaseHistory($code); - $lastHistory = array_last(array_where($histories, function ($history) { + $lastHistory = Arr::last($histories, function ($history) { return $history->type === self::HISTORY_TYPE_COMMENT; - })); + }); return $lastHistory ? $lastHistory->detail : ''; } } diff --git a/modules/system/composer.json b/modules/system/composer.json index 3d58afe4e6..6ea7b38316 100644 --- a/modules/system/composer.json +++ b/modules/system/composer.json @@ -23,9 +23,9 @@ } ], "require": { - "php": "^8.2", + "php": "^8.3", "composer/installers": "~1.11.0", - "laravel/framework": "^12.0", + "laravel/framework": "^13.0", "composer/semver": "^3.2" }, "replace": {