From 13318d20c6b716b5b5d5376ad970f08de8d031a6 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 18 Apr 2024 16:29:31 +1200 Subject: [PATCH] DOC Document new parameter for `DataObject::write()` --- en/08_Changelogs/6.0.0.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/en/08_Changelogs/6.0.0.md b/en/08_Changelogs/6.0.0.md index 2ac720b94..0a59b3f65 100644 --- a/en/08_Changelogs/6.0.0.md +++ b/en/08_Changelogs/6.0.0.md @@ -6,10 +6,16 @@ title: 6.0.0 (unreleased) ## Overview -- [Run `CanonicalURLMiddleware` in all environments by default](#url-middleware) +- [Features and enhancements](#features-and-enhancements) + - [Run `CanonicalURLMiddleware` in all environments by default](#url-middleware) + - [Other new features](#other-new-features) - [Bug fixes](#bug-fixes) +- [API changes](#api-changes) + - [General changes](#api-general) -## Run `CanonicalURLMiddleware` in all environments by default {#url-middleware} +## Features and enhancements + +### Run `CanonicalURLMiddleware` in all environments by default {#url-middleware} In Silverstripe CMS 5 [`CanonicalURLMiddleware`](api:SilverStripe\Control\Middleware\CanonicalURLMiddleware) only runs in production by default. This lead to issues with `fetch` and APIs behaving differently in production environments to development. Silverstripe 6.0 changes this default to run the rules in `dev`, `test`, and `live` by default. @@ -24,10 +30,18 @@ CanonicalURLMiddleware::singleton()->setEnabledEnvs([ ]); ``` +### Other new features + ## Bug fixes This release includes a number of bug fixes to improve a broad range of areas. Check the change logs for full details of these fixes split by module. Thank you to the community members that helped contribute these fixes as part of the release! +## API changes + +### General changes {#api-general} + +- [`DataObject::write()`](api:SilverStripe\ORM\DataObject::write()) has a new boolean `$skipValidation` parameter. This can be useful for scenarios where you want to automatically create a new record with no data initially without restricting how developers can set up their validation rules. +