wintercms / winter

Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.
https://wintercms.com
MIT License
1.36k stars 192 forks source link

Laravel 11 migration #1094

Open mjauvin opened 6 months ago

mjauvin commented 6 months ago

Depends on https://github.com/wintercms/storm/pull/173

mjauvin commented 6 months ago

This one might cause trouble for some migrations:

https://laravel.com/docs/11.x/upgrade#modifying-columns

summary:

When modifying a column, you must now explicitly include all the modifiers you want to keep on the column definition after it is changed. Any missing attributes will be dropped. For example, to retain the unsigned, default, and comment attributes, you must call each modifier explicitly when changing the column, even if those attributes have been assigned to the column by a previous migration.

This has now been overriden in Winter\Storm\Database\Schema\Grammars to restore previous migration behavior.

mjauvin commented 6 months ago

I'm also concerned about this one:

https://laravel.com/docs/11.x/upgrade#publishing-service-providers

Looks like it's fine since we're forcing this in Winter\Storm\Foundation\Application::registerConfiguredProviders()

mjauvin commented 5 months ago

Need to update the following before merging:

diff --git a/composer.json b/composer.json
index fd63730f5..aa4405214 100644
--- a/composer.json
+++ b/composer.json
@@ -30,10 +30,10 @@
     },
     "require": {
         "php": "^8.2",
-        "winter/storm": "dev-wip-laravel-11",
-        "winter/wn-system-module": "dev-wip-laravel-11",
-        "winter/wn-backend-module": "dev-wip-laravel-11",
-        "winter/wn-cms-module": "dev-wip-laravel-11",
+        "winter/storm": "dev-develop as 1.3",
+        "winter/wn-system-module": "dev-develop",
+        "winter/wn-backend-module": "dev-develop",
+        "winter/wn-cms-module": "dev-develop",
         "laravel/framework": "^11.0",
         "wikimedia/composer-merge-plugin": "~2.1.0"
     },
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 39388bfb4..220ed42b0 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -58,7 +58,7 @@ jobs:

       - name: Switch library dependency (develop)
         if: github.ref == 'refs/heads/develop' || github.base_ref == 'develop'
-        run: php ./.github/workflows/utilities/library-switcher "dev-wip-laravel-11 as 1.2"
+        run: php ./.github/workflows/utilities/library-switcher "dev-develop as 1.3"

       - name: Switch library dependency (1.2)
         if: github.head_ref == '1.2' || github.ref == 'refs/heads/1.2' || github.base_ref == '1.2'
@@ -135,7 +135,7 @@ jobs:

       - name: Switch library dependency (develop)
         if: github.ref == 'refs/heads/develop' || github.base_ref == 'develop'
-        run: php ./.github/workflows/utilities/library-switcher "dev-wip-laravel-11 as 1.2"
+        run: php ./.github/workflows/utilities/library-switcher "dev-develop as 1.3"

       - name: Switch library dependency (1.0)
         if: github.head_ref == '1.0' || github.ref == 'refs/heads/1.0' || github.base_ref == '1.0'