Skip to content

Commit

Permalink
DOC Last changes for the changelog before beta release (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Feb 8, 2023
1 parent ef06b22 commit f9fed24
Show file tree
Hide file tree
Showing 19 changed files with 11 additions and 7,534 deletions.
56 changes: 10 additions & 46 deletions en/04_Changelogs/5.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ This is a major release and contains many breaking API changes. Deprecation warn

#### silverstripe/admin

- [`SilverStripe\Admin\SecurityAdmin`](api:SilverStripe\Admin\SecurityAdmin) now extends [`SilverStripe\Admin\ModelAdmin`](api:SilverStripe\Admin\ModelAdmin) instead of [`SilverStripe\Admin\LeftAndMain`](api:SilverStripe\Admin\LeftAndMain)
- Removed deprecated class `SilverStripe\Admin\GroupImportForm`
- Removed deprecated class `SilverStripe\Admin\MemberImportForm`
- Removed deprecated method `SilverStripe\Admin\LeftAndMain::menu_title_for_class()`
Expand Down Expand Up @@ -683,6 +684,9 @@ This is a major release and contains many breaking API changes. Deprecation warn
- Removed deprecated parameter in [`SilverStripe\View\Requirements::add_i18n_javascript()`](api:SilverStripe\View\Requirements::add_i18n_javascript()) named `$langOnly`
- Removed deprecated parameter in [`SilverStripe\View\ThemeManifest::init()`](api:SilverStripe\View\ThemeManifest::init()) named `$ignoredCIConfigs`
- Removed deprecated parameter in [`SilverStripe\View\ThemeManifest::regenerate()`](api:SilverStripe\View\ThemeManifest::regenerate()) named `$ignoredCIConfigs`
- [`SilverStripe\Dev\FunctionalTest`](api:SilverStripe\Dev\FunctionalTest) is now abstract.
- [`SilverStripe\Dev\MigrationTask`](api:SilverStripe\Dev\MigrationTask) is now abstract.
- [`SilverStripe\Dev\SapphireTest`](api:SilverStripe\Dev\SapphireTest) is now abstract.
- Method `SilverStripe\Control\Email\Email::addBCC()` is now defined in `Symfony\Component\Mime\Email` with a different method signature
- Method `SilverStripe\Control\Email\Email::addCC()` is now defined in `Symfony\Component\Mime\Email` with a different method signature
- Method `SilverStripe\Control\Email\Email::addFrom()` is now defined in `Symfony\Component\Mime\Email` with a different method signature
Expand Down Expand Up @@ -949,8 +953,8 @@ This is a major release and contains many breaking API changes. Deprecation warn
- Changed parameter type in [`SilverStripe\Security\MemberAuthenticator\LostPasswordHandler::forgotPassword()`](api:SilverStripe\Security\MemberAuthenticator\LostPasswordHandler::forgotPassword()) for `$data` from dynamic to `array`
- Changed parameter type in [`SilverStripe\Security\MemberAuthenticator\LostPasswordHandler::forgotPassword()`](api:SilverStripe\Security\MemberAuthenticator\LostPasswordHandler::forgotPassword()) for `$form` from dynamic to [`SilverStripe\Forms\Form`](api:SilverStripe\Forms\Form)
- Changed parameter name in [`SilverStripe\Control\Email\Email::addData()`](api:SilverStripe\Control\Email\Email::addData()) from `$name` to `$nameOrData`
- Changed parameter name in [`SilverStripe\Core\Extensible::extend()`](api:SilverStripe\Core\Extensible::extend()) from `$a1` to `$arguments`
- Changed parameter name in [`SilverStripe\Core\Extensible::invokeWithExtensions()`](api:SilverStripe\Core\Extensible::invokeWithExtensions()) from `$a1` to `$arguments`
- Changed parameter name in [`SilverStripe\Core\Extensible::extend()`](api:SilverStripe\Core\Extensible::extend()) from `$a1` to `$arguments` and modified it to accept variable arguments using the splat operator
- Changed parameter name in [`SilverStripe\Core\Extensible::invokeWithExtensions()`](api:SilverStripe\Core\Extensible::invokeWithExtensions()) from `$a1` to `$arguments` and modified it to accept variable arguments using the splat operator
- Changed parameter name in [`SilverStripe\Dev\TestMailer::send()`](api:SilverStripe\Dev\TestMailer::send()) from `$email` to `$message`
- Changed parameter name in [`SilverStripe\ORM\DataList::limit()`](api:SilverStripe\ORM\DataList::limit()) from `$limit` to `$length`
- Changed parameter name in [`SilverStripe\ORM\DataObject::get_one()`](api:SilverStripe\ORM\DataObject::get_one()) from `$orderby` to `$sort`
Expand Down Expand Up @@ -1174,6 +1178,7 @@ This is a major release and contains many breaking API changes. Deprecation warn
- Changed return type for [`SilverStripe\Versioned\Caching\ProxyCacheAdapter::prune()`](api:SilverStripe\Versioned\Caching\ProxyCacheAdapter::prune()) from dynamic to `bool`
- Changed return type for [`SilverStripe\Versioned\Caching\ProxyCacheAdapter::set()`](api:SilverStripe\Versioned\Caching\ProxyCacheAdapter::set()) from dynamic to `bool`
- Changed return type for [`SilverStripe\Versioned\Caching\ProxyCacheAdapter::setMultiple()`](api:SilverStripe\Versioned\Caching\ProxyCacheAdapter::setMultiple()) from dynamic to `bool`
- [`SilverStripe\Versioned\Versioned::__construct()`](api:SilverStripe\Versioned\Versioned::__construct()) now explicitly only accepts `$mode` as a single argument.
- Changed parameter type in [`SilverStripe\Versioned\Caching\ProxyCacheAdapter::delete()`](api:SilverStripe\Versioned\Caching\ProxyCacheAdapter::delete()) for `$key` from dynamic to `string`
- Changed parameter type in [`SilverStripe\Versioned\Caching\ProxyCacheAdapter::deleteMultiple()`](api:SilverStripe\Versioned\Caching\ProxyCacheAdapter::deleteMultiple()) for `$keys` from dynamic to `iterable`
- Changed parameter type in [`SilverStripe\Versioned\Caching\ProxyCacheAdapter::get()`](api:SilverStripe\Versioned\Caching\ProxyCacheAdapter::get()) for `$key` from dynamic to `string`
Expand Down Expand Up @@ -1223,9 +1228,7 @@ This is a major release and contains many breaking API changes. Deprecation warn

### General changes {#api-general}

- [`SecurityAdmin`](api:SilverStripe\Admin\SecurityAdmin) now extends [`ModelAdmin`](api:SilverStripe\Admin\ModelAdmin) instead of [`LeftAndMain`](api:SilverStripe\Admin\LeftAndMain) so that it can make use of standard API. This was done to remove duplicate code.
- `MemberImportForm` has been removed
- `GroupImportForm` has been removed
- [`SecurityAdmin`](api:SilverStripe\Admin\SecurityAdmin) is a [`SilverStripe\Admin\ModelAdmin`](api:SilverStripe\Admin\ModelAdmin).
- Previous extension hook implementations of `SecurityAdmin::updateEditForm($form)` still works as the extension hook is called in [`ModelAdmin::getEditForm()`](api:SilverStripe\Admin\ModelAdmin::getEditForm()).
- The *Users*, *Groups* and *Roles* tabs no longer share the `/admin/security` path and instead have their own dedicated paths. e.g. `/admin/security/users`
- `isDev` and `isTest` query string arguments have been removed due to security concerns (see [ss-2018-005](https://www.silverstripe.org/download/security-releases/ss-2018-005/)).
Expand All @@ -1235,54 +1238,15 @@ This is a major release and contains many breaking API changes. Deprecation warn
- If your `composer.json` file has its `extra.resources-dir` key set to `_resources`, you can remove that now.
- If your `composer.json` file already does not have an `extra.resources-dir` key and you want to keep your resources in the `resources` directory, you can set `extra.resources-dir` to `resources`.
- If your `composer.json` file already does not have an `extra.resources-dir` key and you want to use the new default `_resources` directory, you may need to check that your code and templates don't assume the directory name for those resources. In your templates it is preferred to [use `$resourePath()` or `$resourceURL()`](/developer_guides/templates/requirements/#direct-resource-urls) to get paths for resources.
- [`FunctionalTest`](api:SilverStripe\Dev\FunctionalTest) is now abstract.
- [`MigrationTask`](api:SilverStripe\Dev\MigrationTask) is now abstract.
- [`SapphireTest`](api:SilverStripe\Dev\SapphireTest) is now abstract.
- [`Extensible::invokeWithExtensions()`](api:SilverStripe\Core\Extensible::invokeWithExtensions()) and [`Extensible::extend()`](api:SilverStripe\Core\Extensible::extend()) now use the splat operator instead of having a concrete number of possible arguments.
- The constructor for [`Versioned`](api:SilverStripe\Versioned\Versioned::__construct()) now explicitly only accepts `$mode` as a single argument.
- The following classes have been moved from `silverstripe/cms` to `silverstripe/admin` and renamed:
- `SilverStripe\CMS\Controllers\SilverStripeNavigator` is now in `silverstripe/admin` as `SilverStripe\Admin\Navigator\SilverStripeNavigator`
- `SilverStripe\CMS\Controllers\SilverStripeNavigatorItem` is now in `silverstripe/admin` as `SilverStripe\Admin\Navigator\SilverStripeNavigatorItem`
- `SilverStripe\CMS\Controllers\SilverStripeNavigatorItem_Unversioned` is now in `silverstripe/admin` as `SilverStripe\Admin\Navigator\SilverStripeNavigatorItem_Unversioned`
- The following classes have been moved from `silverstripe/cms` to `silverstripe/versioned-admin` and renamed:
- `SilverStripe\CMS\Controllers\SilverStripeNavigatorItem_ArchiveLink` is now in `silverstripe/versioned` as `SilverStripe\VersionedAdmin\Navigator\SilverStripeNavigatorItem_ArchiveLink`
- `SilverStripe\CMS\Controllers\SilverStripeNavigatorItem_LiveLink` is now in `silverstripe/versioned` as `SilverStripe\VersionedAdmin\Navigator\SilverStripeNavigatorItem_LiveLink`
- `SilverStripe\CMS\Controllers\SilverStripeNavigatorItem_StageLink` is now in `silverstripe/versioned` as `SilverStripe\VersionedAdmin\Navigator\SilverStripeNavigatorItem_StageLink`
- Various internal controller methods have been updated to now consistently return an [`HTTPResponse`](api:SilverStripe\Control\HTTPResponse) object, rather than an undeclared `mixed` return type. These updates do not affect custom controller action methods which can still have an undeclared mixed return type.
- In particular, the following will need to be updated if they have been subclassed and overloaded in custom code:
- [`LeftAndMain::index()`](api:SilverStripe\Admin\LeftAndMain::index())
- [`CMSBatchAction::run()`](api:SilverStripe\Admin\CMSBatchAction::run())
- Removed the `HTMLValue` injection "shorthand", use the fully qualified [`HTMLValue`](api:SilverStripe\View\Parsers\HTMLValue) instead.
- The native PHP interfaces [`ArrayAccess`](https://www.php.net/manual/en/class.arrayaccess.php), [`IteratorAggregate`](https://www.php.net/IteratorAggregate), [`Countable`](https://www.php.net/manual/en/class.countable.php), [`SessionHandlerInterface`](https://www.php.net/manual/en/class.sessionhandlerinterface.php) and [`Iterator`](https://www.php.net/manual/en/class.iterator.php) are now strongly typed. All Silverstripe CMS classes implementing those interfaces have been updated to be strongly typed and all `#[\ReturnTypeWillChange]` annotations have been removed. This includes:
- [`HTTPRequest`](api:SilverStripe\Control\HTTPRequest)
- [`BulkLoader_Result`](api:SilverStripe\Dev\BulkLoader_Result)
- [`ArrayList`](api:SilverStripe\ORM\ArrayList)
- [`MySQLQuery`](api:SilverStripe\ORM\MySQLQuery\Connect\MySQLQuery)
- [`MySQLStatement`](api:SilverStripe\ORM\MySQLQuery\Connect\MySQLStatement)
- [`Query`](api:SilverStripe\ORM\MySQLQuery\Connect\Query)
- [`DataList`](api:SilverStripe\ORM\DataList)
- [`ListDecorator`](api:SilverStripe\ORM\ListDecorator)
- [`Map`](api:SilverStripe\ORM\Map)
- [`PaginatedList`](api:SilverStripe\ORM\PaginatedList)
- [`UnsavedRelationList`](api:SilverStripe\ORM\UnsavedRelationList)
- [`ViewableData`](api:SilverStripe\View\ViewableData)
- [`CMSMenu`](api:SilverStripe\Admin\CMSMenu)
- [`DefaultAssetNameGenerator`](api:SilverStripe\Assets\Storage\DefaultAssetNameGenerator)
- [`HybridSession`](api:SilverStripe\HybridSessions\HybridSession)
- [`CookieStore`](api:SilverStripe\HybridSessions\Store\CookieStore)
- [`DatabaseStore`](api:SilverStripe\HybridSessions\Store\DatabaseStore)
- [`LDAPIterator`](api:SilverStripe\LDAP\Iterators\LDAPIterator)
- [`CombinationsArrayIterator`](api:SilverStripe\FullTextSearch\Utils\CombinationsArrayIterator)
- [`MultipleArrayIterator`](api:SilverStripe\FullTextSearch\Utils\MultipleArrayIterator)


### Email {#api-email}

- Email was sent in CMS 4 using [SwiftMailer](https://swiftmailer.symfony.com/docs/introduction.html), which has since [gone End Of Life](https://symfony.com/blog/the-end-of-swiftmailer). In CMS 5, this has been replaced with [symfony/mailer](https://symfony.com/doc/current/mailer.html). `symfony/mailer` is the currently maintained email package from Symfony. It's a more flexible email system that allows easier integration with third-party email providers.
- In CMS 4, the [`Email`](api:SilverStripe\Control\Email\Email) class subclassed [`ViewableData`](api:SilverStripe\View\ViewableData). In CMS 5, it now subclasses `Symfony\Component\Mime\Email`.
- In CMS 4, the [`SilverStripe\Control\Email\Email`](api:SilverStripe\Control\Email\Email) class subclassed [`SilverStripe\View\ViewableData`](api:SilverStripe\View\ViewableData). In CMS 5, it now subclasses `Symfony\Component\Mime\Email`.
- `MailTransport`, which used the php native `mail()` function, is no longer present in CMS 5. This is because [Symfony considers `mail()` to be insecure](https://github.com/swiftmailer/swiftmailer/issues/866#issuecomment-289291228).
- If your site has a custom email configuration e.g. SMTP configuration, this will need to be updated, as the configuration has changed from Silverstripe yml to a much more flexible and standardised [DSN string](https://symfony.com/doc/current/mailer.html#transport-setup). See [the email documentation](/developer_guides/email/) for more details. The configuration for email has changed completely - read the updated documentation carefully.
- The following return types where changed on the following methods in [`Email`](api:SilverStripe\Control\Email\Email).
- The following return types were changed on the following methods in [`SilverStripe\Control\Email\Email`](api:SilverStripe\Control\Email\Email).
- Used to return a `string`, now returns an nullable [`Address`](https://symfony.com/doc/current/mailer.html#email-addresses) object.
- `getReturnPath()`
- `getSender()`
Expand Down
Loading

0 comments on commit f9fed24

Please sign in to comment.