diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c63eb1fa3..9d712b741 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -28,5 +28,6 @@ - [ ] The commit messages follow our [commit message guidelines](https://docs.silverstripe.org/en/contributing/code/#commit-messages) - [ ] The PR follows our [contribution guidelines](https://docs.silverstripe.org/en/contributing/documentation/) - [ ] The changes follow our [writing style guide](https://docs.silverstripe.org/en/contributing/documentation/#writing-style) +- [ ] Changes that are only effective from a certain minor version have an Info box flagging as such - [ ] Code examples follow our [coding conventions](https://docs.silverstripe.org/en/contributing/coding_conventions/) - [ ] CI is green diff --git a/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md b/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md index ef4855dad..46fc3f682 100644 --- a/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md +++ b/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md @@ -624,6 +624,9 @@ public function countDuplicates($model, $fieldToCheck) ### Common table expressions (CTE aka the `WITH` clause) {#cte} +> [!INFO] +> Common Table Expressions are available from version 5.2. + Common Table Expressions are a powerful tool both for optimising complex queries, and for creating recursive queries. You can use these by calling the [`DataQuery::with()`](api:SilverStripe\ORM\DataQuery::with()) method. Note that there is no direct abstraction for this on `DataList`, so you'll need to [modify the underlying `DataQuery`](#modifying-the-underlying-query) to apply a CTE to a `DataList`. diff --git a/en/02_Developer_Guides/00_Model/02_Relations.md b/en/02_Developer_Guides/00_Model/02_Relations.md index 927367287..9350f2217 100644 --- a/en/02_Developer_Guides/00_Model/02_Relations.md +++ b/en/02_Developer_Guides/00_Model/02_Relations.md @@ -899,6 +899,9 @@ Eager loading supports all relationship types. ### Manipulating eager loading queries +> [!INFO] +> The filtering functionality in the Eager loading API is available from version 5.2. + There are some limitations to manipulating an `EagerLoadedList` (i.e. after the query has been executed). The main limitation is that filtering or sorting an `EagerLoadedList` will be done in PHP rather than as part of the database query, since we have already loaded all its relevant data into memory. diff --git a/en/02_Developer_Guides/00_Model/08_SQL_Select.md b/en/02_Developer_Guides/00_Model/08_SQL_Select.md index 4356504b7..a565265d1 100644 --- a/en/02_Developer_Guides/00_Model/08_SQL_Select.md +++ b/en/02_Developer_Guides/00_Model/08_SQL_Select.md @@ -413,6 +413,9 @@ foreach ($columns as $alias => $ansiQuotedColumn) { ### Common table expressions (CTE aka the `WITH` clause) {#cte} +> [!INFO] +> Common Table Expressions are available from version 5.2. + Common Table Expressions are a powerful tool both for optimising complex queries, and for creating recursive queries. You can use these by calling the [`SQLSelect::addWith()`](api:SilverStripe\ORM\Queries\SQLSelect::addWith()) method. Older database servers don't support this functionality, and the core implementation is only valid for MySQL (though community modules may add support for other database connectors). If you are using this functionality in an open source module or a project that you can't guarantee the type and version of database being used, you should wrap the query in a condition checking if CTEs are supported. You can do that by calling [`DB::get_conn()->supportsCteQueries()`](api:SilverStripe\ORM\Connect\Database::supportsCteQueries()). diff --git a/en/02_Developer_Guides/00_Model/09_Validation.md b/en/02_Developer_Guides/00_Model/09_Validation.md index e531dd0e6..95f55df2b 100644 --- a/en/02_Developer_Guides/00_Model/09_Validation.md +++ b/en/02_Developer_Guides/00_Model/09_Validation.md @@ -8,6 +8,9 @@ icon: check-square ## Validation using `symfony/validator` constraints {#symfony-validator} +> [!INFO] +> The `symfony/validator` integration is available from version 5.2. + The [`ConstraintValidator`](api:SilverStripe\Core\Validation\ConstraintValidator) class provides an abstraction around [`symfony/validator`](https://symfony.com/doc/current/components/validator.html), so you can easily validate values against symfony's validation constraints and get a [`ValidationResult`](api:SilverStripe\ORM\ValidationResult) object with the result. ```php diff --git a/en/02_Developer_Guides/07_Debugging/index.md b/en/02_Developer_Guides/07_Debugging/index.md index d200dc265..5d238458f 100644 --- a/en/02_Developer_Guides/07_Debugging/index.md +++ b/en/02_Developer_Guides/07_Debugging/index.md @@ -36,6 +36,9 @@ Backtrace::backtrace(); ## Debugging database queries +> [!INFO] +> This functionality is available from version 5.2. + You can opt in to including a comment on all ORM queries indicating where the query was executed by setting the [DBQueryBuilder.trace_query_origin](api:SilverStripe\ORM\Connect\DBQueryBuilder->trace_query_origin) configuration property or the `SS_TRACE_DB_QUERY_ORIGIN` environment variable to `true`. Note that the environment variable, if set, will take precedence over the configuration property value. diff --git a/en/02_Developer_Guides/14_Files/05_File_Manipulation.md b/en/02_Developer_Guides/14_Files/05_File_Manipulation.md index 43288e2ad..26ed9afb7 100644 --- a/en/02_Developer_Guides/14_Files/05_File_Manipulation.md +++ b/en/02_Developer_Guides/14_Files/05_File_Manipulation.md @@ -157,6 +157,9 @@ if ($file) { ## Convert a file to a different format {#file-conversion} +> [!INFO] +> The conversion APIs are available from version 5.2. + ### The high-level API {#file-conversion-highlevel} The [`File`](api:SilverStripe\Assets\File) and [`DBFile`](api:SilverStripe\Assets\Storege\DBFile) classes share a trait which implements a [`Convert()`](api:SilverStripe\Assets\ImageManipulation::Convert()) method. diff --git a/en/10_Contributing/02_Documentation.md b/en/10_Contributing/02_Documentation.md index 3cefe1342..b4aac01a9 100644 --- a/en/10_Contributing/02_Documentation.md +++ b/en/10_Contributing/02_Documentation.md @@ -117,6 +117,7 @@ documenting, there shouldn't be any "frequently asked questions" left. - When referencing directories, always add a trailing slash to avoid confusions with regular files. - "Silverstripe CMS" is used to refer to the Silverstripe CMS open source project as a whole. - "Silverstripe" is used to refer to the company, where appropriate. +- When writing about a change introduced in a minor/patch release, include an Info box that declares the version it is relevant from, e.g. "This feature is available from version 5.2." ## Extended markdown syntax