From 8757c5672f9b7583e1ceb8b20d5385ace615e431 Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Thu, 13 Apr 2023 01:31:32 +0200 Subject: [PATCH] Update upgrade guide --- UPGRADE.md | 31 +++++++++++-------- .../1_docs/2_getting-started/6_upgrading.md | 12 ++++--- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 19069af36..809eeeb9d 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -31,51 +31,56 @@ We provide an automated upgrade path using the commands explained below. This wi php ./vendor/area17/twill/upgrade.php ``` -## Other changes +### Other changes -### Changes in admin app url/path +#### Changes in admin app url/path -The admin url is now by default /admin instead of a subdomain. Please read the docs to change this to a [subdomain](https://twillcms.com/docs/getting-started/installation.html#content-using-a-subdomain) if you were relying on that. +The admin url is now by default /admin instead of a subdomain. Please check the docs to change this to a [subdomain](https://twillcms.com/docs/getting-started/installation.html#content-using-a-subdomain) if +you were relying on that. On top of that, this is now more "loose" and does not require the exact url. However, you can set it back to being strict using: `ADMIN_APP_STRICT=true` -### withVideo on media defaults to false +#### WYSIWYG fields defaults to Tiptap + +If you are relying on Quill.js specifics (like css classes), use `'type' => 'quill'` on your `wysiwyg` form fields. + +#### withVideo on media defaults to false Previously `withVideo` was true by default, if you relied on this you have to update these media fields to `'withVideo' => true`. -### SVG's are now no longer passing thorough glide +#### SVG's are now no longer passing thorough glide These are now rendered directly, you can change this by updating config `twill.glide.original_media_for_extensions` to an empty array `[]` -### media/file library +#### Media library -The default for media and file libraries are now local and glide, if you relied on the default config for aws -then you now need to specify this in your `.env`. +The default for media and file libraries are now local and glide, if you relied on the default config for S3 and Imgix +then you now need to [specify it](https://twillcms.com/docs/getting-started/installation.html#content-storage-on-s3) in your `.env`. -### Block editor render children +#### Block editor render children The `renderBlocks` method now has the mapping as first argument. The `renderBlocks` method now by default will NOT render the nested repeaters below the block. If you relied on this you now need to update to `renderBlocks([], true)` -### scopeForBucket replaced with getForBucket in featured +#### scopeForBucket replaced with getForBucket in featured In Twill 2 scopeForBucket would return a collection of featured items. However, as the name illustrates, this is not a scope. In Twill 3 `scopeForBucket` is an actual scope and `getForBucket` is a helper to get the items directly. -### Crops +#### Crops Model crops are now a global config, if you do not need model specific crops you can manage them globally from your config. -### twillIncrementsMethod and twillIntegerMethod are removed +#### twillIncrementsMethod and twillIntegerMethod are removed The default now is bigIncrements and bigInteger. If you relied on these functions for custom logic you can add them to your own codebase. For reference the functions are below: @@ -106,7 +111,7 @@ if (!function_exists('twillIntegerMethod')) { } ``` -### Many methods now have typings to them +#### Many methods now have typings to them If you are overriding methods in your repository/controller or request classes. They may now need typed arguments and return types. diff --git a/docs/content/1_docs/2_getting-started/6_upgrading.md b/docs/content/1_docs/2_getting-started/6_upgrading.md index 974258ff2..f30363784 100644 --- a/docs/content/1_docs/2_getting-started/6_upgrading.md +++ b/docs/content/1_docs/2_getting-started/6_upgrading.md @@ -37,7 +37,7 @@ php ./vendor/area17/twill/upgrade.php #### Changes in admin app url/path -The admin url is now by default /admin instead of a subdomain. Please consult the docs to change this to a subdomain if +The admin url is now by default /admin instead of a subdomain. Please check the docs to change this to a [subdomain](https://twillcms.com/docs/getting-started/installation.html#content-using-a-subdomain) if you were relying on that. On top of that, this is now more "loose" and does not require the exact url. However, you can set it back to being @@ -45,6 +45,10 @@ strict using: `ADMIN_APP_STRICT=true` +#### WYSIWYG fields defaults to Tiptap + +If you are relying on Quill.js specifics (like css classes), use `'type' => 'quill'` on your `wysiwyg` form fields. + #### withVideo on media defaults to false Previously `withVideo` was true by default, if you relied on this you have to update these media fields to @@ -54,10 +58,10 @@ Previously `withVideo` was true by default, if you relied on this you have to up These are now rendered directly, you can change this by updating config `twill.glide.original_media_for_extensions` to an empty array `[]` -#### media/file library +#### Media library -The default for media and file libraries are now local and glide, if you relied on the default config for aws -then you now need to specify this in your `.env`. +The default for media and file libraries are now local and glide, if you relied on the default config for S3 and Imgix +then you now need to [specify it](https://twillcms.com/docs/getting-started/installation.html#content-storage-on-s3) in your `.env`. #### Block editor render children