Skip to content

Commit

Permalink
DOC Remove support for MySQL 5
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Aug 29, 2024
1 parent ced3de0 commit 5782183
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
22 changes: 6 additions & 16 deletions en/00_Getting_Started/00_Server_Requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ You also need to install [Composer 2](https://getcomposer.org/).

We officially support and regression test against the latest LTS releases of MySQL and MariaDB, though we may choose to support additional versions on a case-by-case basis.

- MySQL >=5.6 and MariaDB (built-in, [commercially supported](/project_governance/supported_modules/))
- MySQL >=8.0 and MariaDB (built-in, [commercially supported](/project_governance/supported_modules/))
- PostgreSQL ([third party module](https://github.com/silverstripe/silverstripe-postgresql), community
supported)
- SQL Server ([third party module](https://github.com/silverstripe/silverstripe-mssql), community supported)
Expand All @@ -37,23 +37,13 @@ We officially support and regression test against the latest LTS releases of MyS
### Default MySQL collation

New projects default to the `utf8mb4_unicode_ci` collation when running
against MySQL, which offers better support for multi-byte characters such as emoji. However, this may cause issues
related to Varchar fields exceeding the maximum indexable size:
against MySQL, which offers better support for multi-byte characters such as emoji.

- MySQL 5.6 supports larger indexes (3072 bytes) if the `innodb_large_prefix` setting is enabled (but not by default)
- MySQL 5.7 and newer have `innodb_large_prefix` enabled by default
- MariaDB ~10.1 matches MySQL 5.6's behaviour, >10.2 matches 5.7's.
### Connection mode (sql_mode) when using MySQL server >=8.0.0

You can rectify this issue by upgrading MySQL, enabling the `innodb_large_prefix` setting if available, or reducing the
size of affected fields. If none of these solutions are currently suitable, you can remove the collation
configuration from `app/_config/mysite.yml` to default back to the legacy default collation.

### Connection mode (sql_mode) when using MySQL server >=5.7.5

In MySQL versions >=5.7.5, the `ANSI` sql_mode setting behaves differently and includes the `ONLY_FULL_GROUP_BY`
setting. It is generally recommended to leave this setting as-is because it results in deterministic SQL. However, for
some advanced cases, the sql_mode can be configured on the database connection via the configuration API (
see `MySQLDatabase::$sql_mode` for more details.)
In MySQL versions >=8.0.0, the `ANSI` sql_mode setting includes the `ONLY_FULL_GROUP_BY`
setting. It is generally recommended to leave this setting as-is because it results in deterministic SQL.
However, for some advanced cases, the sql_mode can be configured on the database connection via the configuration API (see `MySQLDatabase::$sql_mode` for more details.)

### MySQL/MariaDB int width in schema

Expand Down
2 changes: 1 addition & 1 deletion en/02_Developer_Guides/09_Security/05_Secure_Coding.md
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,6 @@ for details on how to apply caching safely, and read Google's
## Related

- [Silverstripe CMS security vulnerability advisories](https://silverstripe.org/security-releases/)
- [MySQL security documentation](https://dev.mysql.com/doc/refman/8.0/en/security.html)
- [MySQL security documentation](https://dev.mysql.com/doc/refman/8.4/en/security.html)
- [OWASP Top Ten](https://owasp.org/www-project-top-ten/)
- [OWASP List of Attacks](https://owasp.org/www-community/attacks/)
16 changes: 14 additions & 2 deletions en/08_Changelogs/6.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ title: 6.0.0 (unreleased)
- [Changes to scaffolded form fields](#scaffolded-fields)
- [`SiteTree` uses form field scaffolding](#sitetree-scaffolding)
- [Changes to the templating/view layer](#view-layer)
- [Other new features and small changes](#other-new-features)
- [Other new features](#other-new-features)
- [Dependency changes](#dependency-changes)
- [`intervention/image` has been upgraded from v2 to v3](#intervention-image)
- [Bug fixes](#bug-fixes)
- [API changes](#api-changes)
- [Most extension hook methods are now protected](#hooks-protected)
- [Strict typing for `Factory` implementations](#factory-strict-typing)
- [General changes](#api-general)
- [Other changes](#other-changes)
- [MySQL 5 no longer supported](#mysql-5-support)
- [`DBDecimal` default value](#dbdecimal-default-value)
- [Full list of removed and changed API (by module, alphabetically)](#api-removed-and-changed)

## Features and enhancements
Expand Down Expand Up @@ -203,7 +206,6 @@ See the [full list of removed and changed API](#api-removed-and-changed) to see
- Modules no longer need to have a root level `_config.php` or `_config` directory to be recognised as a Silverstripe CMS module. They will now be recognised as a module if they have a `composer.json` file with a `type` of `silverstripe-vendormodule` or `silverstripe-theme`.
- A new [`DataObject::getCMSEditLink()`](api:SilverStripe\ORM\DataObject::getCMSEditLink()) method has been added, which returns `null` by default. This provides more consistency for that method which has previously been inconsistently applied to various subclasses of `DataObject`. See [managing records](/developer_guides/model/managing_records/#getting-an-edit-link) for more details about providing sane values for this method in your own subclasses.
- The `CMSEditLink()` method on many `DataObject` subclasses has been renamed to `getCMSEditLink()`.
- 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.

## Dependency changes

Expand Down Expand Up @@ -339,6 +341,16 @@ Injector::inst()->load([
- [`FieldList`](api:SilverStripe\Forms\FieldList) is now strongly typed. Methods that previously allowed any iterable variables to be passed, namely [`FieldList::addFieldsToTab()`](api:SilverStripe\Forms\FieldList::addFieldsToTab()) and [`FieldList::removeFieldsFromTab()`](api:SilverStripe\Forms\FieldList::removeFieldsFromTab()), now require an array to be passed instead.
- [`BaseElement::getDescription()`](api:DNADesign\Elemental\Models\BaseElement::getDescription()) has been removed. If you had implemented this method in your custom elemental blocks, either set the [`description`](api:DNADesign\Elemental\Models\BaseElement->description) configuration property or override the [`getTypeNice()`](api:DNADesign\Elemental\Models\BaseElement::getTypeNice()) method.

## Other changes

### MySQL 5 no longer supported {#mysql-5-support}

MySQL 5.6 and 5.7 are no longer supported. The minimum supported version is MySQL 8.0. We support and test against against the latest LTS releases of MySQL and MariaDB.

### `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.

### Full list of removed and changed API (by module, alphabetically) {#api-removed-and-changed}

<!--- Changes below this line will be automatically regenerated -->
Expand Down

0 comments on commit 5782183

Please sign in to comment.