Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Add additional context to CMS 5 changelog #267

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions en/04_Changelogs/5.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ This changelog provides a list of changes between Silverstripe CMS 4.13 and 5.0.
- [Fixed dependencies](#fixed-dependencies)
- [Dependency changes](#dependency-changes)
- [General changes](#dep-general)
- [Composer](#composer)
- [TinyMCE upgraded from 4 to 6](#tinymce6)
- [Front-end build stack upgrades](#front-end)
- [Webpack config](#webpack-config)
Expand Down Expand Up @@ -212,6 +213,12 @@ Review [Silverstripe CMS 5 fixed dependencies](/project_governance/fixed_depende
- Review the [PHPUnit 9 documentation ](https://docs.silverstripe.org/en/4/upgrading/phpunit9/) for more details.
- `masterminds/html5` is now used to parse HTML content instead of `DomDocument::loadHTML()`. This may cause slight changes in rendered content if the content being saved contains invalid HTML. The `silverstripe/html5` module is no longer required for rendering HTML 5 content and should be removed from your project.

### Composer

Silverstripe CMS 5 requires Composer 2.

If your hosting provider runs Composer commands for you on deployment, you'll need to make sure they are using Composer 2 before attempting to deploy. For Silverstripe Cloud and Silverstripe Cloud Public Sector customers, make sure your stack is using Code Builder version 2.

### TinyMCE upgraded from 4 to 6 {#tinymce6}

TinyMCE has been upgraded up two major versions from 4 to 6. The API for [`HTMLEditorConfig`](api:SilverStripe\Forms\HTMLEditor\HTMLEditorConfig) and [`TinyMCEConfig`](api:SilverStripe\Forms\HTMLEditor\TinyMCEConfig) haven't changed at all, but there have been some changes to plugins and options which may affect your projects. Here are some notable changes:
Expand Down Expand Up @@ -570,6 +577,7 @@ This empowers advanced `Extension` functionality such as [Versioned::canPublish(

- `SS_MANIFESTCACHE` can no longer use the now removed `symfony/cache` 4.x "Simple" cache classes e.g. `Symfony\Component\Cache\Simple\PhpFilesCache`. Instead, use the corresponding "Adapter" class e.g. `Symfony\Component\Cache\Adapter\PhpFilesAdapter`.
- `APP_SMTP_USERNAME` and `APP_SMTP_PASSWORD` have been removed. Use a `MAILER_DSN` environment variable instead to configure SMTP email (see [the email documentation](/developer_guides/email/) for more details).
- `MySQLPDODatabase` is no longer a valid option for the `SS_DATABASE_CLASS` environment variable. Use `MySQLDatabase` instead.

## Bug fixes

Expand Down Expand Up @@ -598,6 +606,7 @@ This is a major release and contains many breaking API changes. Deprecation warn
- The legacy file resolution strategy introduced in CMS 4.4.0 is no longer available. If you still use the legacy file resolution strategy, follow the [file migration instructions](https://docs.silverstripe.org/en/4/developer_guides/files/file_migration/) and then change your file resolution configuration to match the defaults in [the assets.yml file in silverstripe/installer](https://github.com/silverstripe/silverstripe-installer/blob/4/app/_config/assets.yml).
- Removed the `HTMLValue` injection "shorthand", use the fully qualified [`HTMLValue`](api:SilverStripe\View\Parsers\HTMLValue) instead.
- In `silverstripe/staticpublishqueue`, the class [`SilverStripe\StaticPublishQueue\Dev\StaticPublisherState`](api:SilverStripe\StaticPublishQueue\Dev\StaticPublisherState) is no longer enabled by default and can be enabled via opt-in. There are opt-in instructions in the [`README.md` of the module](https://github.com/silverstripe/silverstripe-staticpublishqueue#readme).
- [`SiteTree`](api:SilverStripe\CMS\Model\SiteTree) no longer automatically detects the controller if the controller name is `<PageClass>_Controller` - it must be `<PageClass>Controller` or be declared in the `SiteTree.controller_name` configuration property. See [Connecting Pages to ContentControllers](/developer_guides/controllers/introduction/#connecting-pages-to-contentcontrollers) for more details.

### Email {#api-email}

Expand Down Expand Up @@ -649,6 +658,19 @@ For example, `<% loop $Pages.Limit(5) %>{$Up.Up.Title}<% end_loop %>` previously

You may need to do a search for `$Up.Up` in your templates to resolve situations where you have worked around this - with the example above, you would need to rewrite it to `$Up.Title` (removing the second `Up`).

#### `$First` and `$Last` removed from the Loop scope

In templates it's common to want to check if an item is the first or last item in a loop. This used to be done with `$First` and `$Last`, but these methods have been removed to avoid clashes with other methods with the same name. Use `$IsFirst` and `$IsLast` instead.

```diff
<% loop $MyList %>
- <% if $First %>
+ <% if $IsFirst %>
<%-- do something --%>
<% end_if %>
<% end_loop %>
```

#### Primitive values can be passed into method calls

Numeric, boolean and null values passed to methods in templates now preserve their type, rather than always being cast to strings. E.g. `$Foo(true)` would previously pass a string argument `'true'` to the `Foo()` method, but now passes an actual boolean.
Expand Down