Skip to content

Commit

Permalink
DOC Add entry about utf8mb4 encoding update to changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-rainville committed Oct 19, 2024
1 parent 2d4bbe0 commit 2d288e6
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion en/08_Changelogs/6.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 2d288e6

Please sign in to comment.