diff --git a/en/08_Changelogs/6.0.0.md b/en/08_Changelogs/6.0.0.md index 6860660b..f1421068 100644 --- a/en/08_Changelogs/6.0.0.md +++ b/en/08_Changelogs/6.0.0.md @@ -716,11 +716,32 @@ If you reference any of these classes in your project or module, most likely in MySQL 5.6 and 5.7 are no longer supported. The minimum supported version is MySQL 8.0. We support and test against the latest LTS releases of MySQL and MariaDB. +### MySQL now defaults to `utf8mb4` {#mysql-utf8mb4} + +MySQL will now use `utf8mb4` by default rather than plain `utf8`. This provides better support for emojis and other special characters. + +Depending on when you created your Silverstripe CMS project, you may already be using `utf8mb4` as the default encoding. The `silverstripe/installer` has included a configuration file setting your database settings to `utf8mb4` for a few years. + +When upgrading your Silverstripe CMS project, review the `app/_config/mysite.yml` file and remove the following lines if they exist: + +```yml +# UTF8MB4 has limited support in older MySQL versions. +# Remove this configuration if you experience issues. +--- +Name: myproject-database +--- +SilverStripe\ORM\Connect\MySQLDatabase: + connection_charset: utf8mb4 + connection_collation: utf8mb4_unicode_ci + charset: utf8mb4 + collation: utf8mb4_unicode_ci +``` + ### `DBDecimal` default value {#dbdecimal-default-value} Previously if an invalid default value was provided for a [`DBDecimal`](api:SilverStripe\ORM\FieldType\DBDecimal) database column, it would silently set the defalt value to `0`. This will now throw an exception instead, so that you're aware your configured value is invalid and can correct it. -## `RedirectorPage` validation +### `RedirectorPage` validation [`RedirectorPage`](api:SilverStripe\CMS\Model\RedirectorPage) now uses the [`Url` constraint](https://symfony.com/doc/current/reference/constraints/Url.html) from `symfony/validator` to validate the `ExternalURL` field. It will no longer add `http://` to the start of URLs for you if you're missing a protocol - instead, a validation error message will be displayed.