Skip to content

Commit

Permalink
Merge branch '6.0' into 6
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jan 8, 2025
2 parents cf2acb9 + 9836332 commit 45d6379
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion en/00_Getting_Started/02_Composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ file. It will appear in your project root, and by default, it will look somethin
"require": {
"php": "^8.3",
"silverstripe/recipe-plugin": "~2.0.1@stable",
"silverstripe/vendor-plugin": "~2.0.3@stable",
"silverstripe/vendor-plugin": "~3.0.0@stable",
"silverstripe/recipe-cms": "~6.0.0@stable",
"silverstripe-themes/simple": "~3.2.0@stable",
"silverstripe/login-forms": "~6.0.0@stable"
Expand Down
11 changes: 2 additions & 9 deletions en/02_Developer_Guides/00_Model/06_SearchFilters.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,19 @@ $players = Player::get()->filterAny([
Developers can define their own [SearchFilter](api:SilverStripe\ORM\Filters\SearchFilter) if needing to extend the ORM filter and exclude behaviors.

## Modifiers
## Modifiers and case sensitivity {#modifiers}

`SearchFilter`s can also take modifiers. The modifiers currently supported are `":not"`, `":nocase"`, and
`":case"` (though you can implement custom modifiers on your own `SearchFilter` implementations). These negate the filter, make it case-insensitive and make it case-sensitive, respectively.

> [!NOTE]
> The default comparison uses the database's default case sensitivity. For MySQL and MSSQL, this is case-insensitive. For PostgreSQL, this is case-sensitive. But you can declare the default
> The default comparison uses the database's default case sensitivity (even for `ArrayList`). For MySQL and MSSQL, this is case-insensitive. For PostgreSQL, this is case-sensitive. But you can declare the default
> case sensitivity for your project by setting the `default_case_sensitive` configuration property on `SearchFilter` like so:
>
> ```yml
> SilverStripe\ORM\Filters\SearchFilter:
> default_case_sensitive: false
> ```
>
> Though note that for backwards compatibility reasons, `ArrayList` is explicitly case sensitive by default. To change that, you must set `ArrayList.default_case_sensitive` to false.
>
> ```yml
> SilverStripe\Model\List\ArrayList:
> default_case_sensitive: false
> ```
```php
// Fetch players that their FirstName is exactly 'Sam'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ MyAdmin:
- App\Extension\MyAdminExtension
```
The following extension points are available: `updateEditForm()`, `updateSearchContext()`,
`updateSearchForm()`, `updateList()`, `updateImportForm`.
The following extension points are available: `updateEditForm()`, `updateList()`, `updateImportForm`.
8 changes: 8 additions & 0 deletions en/08_Changelogs/6.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ title: 6.0.0 (unreleased)
- [Dependency changes](#dependency-changes)
- [`intervention/image` has been upgraded from v2 to v3](#intervention-image)
- [symfony dependencies have been upgraded from v6 to v7](#symfony)
- [JavaScript dependencies](#javascript-dependencies)
- [Bug fixes](#bug-fixes)
- [API changes](#api-changes)
- [Many renamed classes](#renamed-classes)
Expand Down Expand Up @@ -864,6 +865,12 @@ The following new methods have been added to facilitate this upgrade:

We've upgraded the various Symfony dependencies from v6 to v7.

### JavaScript dependencies

Several JavaScript dependencies have been updated, and a few have been replaced.

Notably, [`react-dnd`](https://react-dnd.github.io/react-dnd/about) has been replaced with [`dnd-kit`](https://dndkit.com/). If you were using `react-dnd` and relying on the webpack externals provided by `silverstripe/admin`, these are no longer available. We recommend refactoring your code to use `dnd-kit` so that your UX is consistent with other drag-and-drop in the CMS.

## 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!
Expand Down Expand Up @@ -1048,6 +1055,7 @@ As part of these changes [`ArrayList::find()`](api:SilverStripe\Model\List\Array
- `DNADesign\Elemental\Models\BaseElement::getDescription()` and the corresponding `DNADesign\Elemental\Models\BaseElement.description` configuration property have been removed. If you were using either of these in your custom elemental blocks, either set the new [`class_description`](api:SilverStripe\ORM\DataObject->class_description) configuration property or override one of the [`i18n_classDescription()`](api:SilverStripe\ORM\DataObject::i18n_classDescription()) or [`getTypeNice()`](api:DNADesign\Elemental\Models\BaseElement::getTypeNice()) methods instead.
- `SilverStripe\ORM\DataExtension`, `SilverStripe\CMS\Model\SiteTreeExtension`, and `SilverStripe\Admin\LeftAndMainExtension` have been removed. If you subclass any of these classes, you must now subclass [`Extension`](api:SilverStripe\Core\Extension) directly instead.
- [`DBCurrency`](api:SilverStripe\ORM\FieldType\DBCurrency) will no longer parse numeric values contained in a string when calling `setValue()`. For instance "this is 50.29 dollars" will no longer be converted to "$50.29", instead its value will remain as "this is 50.29 dollars" and it will throw a validation exception if attempted to be written to the database.
- The `SilverStripe\Model\List\ArrayList.default_case_sensitive` configuration property has been removed. This means the default case sensitivity of `ArrayList` is now the same as any other list which uses search filters. If you were using that configuration property, or you were relying on `ArrayList` being case sensitive by default, you should double check that your list filters are working the way you expect. See [search filters](/developer_guides/model/searchfilters/#modifiers) for details about case sensitivity in search filters.

## Other changes

Expand Down
8 changes: 3 additions & 5 deletions en/10_Contributing/03_Translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ If a core or supported module is not listed on Transifex, usually that means it
If you find a core or supported module which has strings that can be (or should be able to be) translated, please
[raise an issue on GitHub](./issues_and_bugs) for that module.

### How do I translate substituted strings? (Such as `%s` or `{my-variable}`)
### How do I translate substituted strings? (Such as `{my-variable}`)

You don't have to - if the english string reads 'Hello %s', your german translation would be 'Hallo %s'. Strings
prefixed by a percentage-sign are automatically replaced by Silverstripe CMS with dynamic content. See
<https://php.net/sprintf> for details. The newer `{my-variable}` format works the same way, but makes its intent clearer,
and allows reordering of placeholders in your translation.
You don't have to - if the english string reads 'Hello {my-variable}', your german translation would be 'Hallo {my-variable}'. Strings
included in `{}` are automatically replaced by Silverstripe CMS with dynamic content.

### Do I need to convert special characters (such as HTML entities)?

Expand Down
2 changes: 1 addition & 1 deletion en/12_Project_Governance/07_Supported_Modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Core Module | Supported major release line
[silverstripe/session-manager](https://packagist.org/packages/silverstripe/session-manager) | 3
[silverstripe/siteconfig](https://packagist.org/packages/silverstripe/siteconfig) | 6
[silverstripe/template-engine](https://packagist.org/packages/silverstripe/template-engine) | 1
[silverstripe/vendor-plugin](https://packagist.org/packages/silverstripe/vendor-plugin) | 2
[silverstripe/vendor-plugin](https://packagist.org/packages/silverstripe/vendor-plugin) | 3
[silverstripe/versioned](https://packagist.org/packages/silverstripe/versioned) | 3
[silverstripe/versioned-admin](https://packagist.org/packages/silverstripe/versioned-admin) | 3

Expand Down

0 comments on commit 45d6379

Please sign in to comment.