silverstripe-framework/docs/en/04_Changelogs/beta/4.7.0-beta1.md

41 KiB

4.7.0-beta1

Overview

New features

Updated file usage table

CMS users can view where a file is used by accessing the Used on tab in the Files section. This feature allows them to identify what DataObjects depend on the file.

The following changes have been made to the Used on table:

  • Data is now sourced from has_one and many_many relations instead of the ownership API
  • This means more data relationships should be shown than before
  • Uses the new RelatedDataService API in the framework module which can also be used for other non-file use cases
  • Support for linking ancestor relationships in the same table row, for instance showing the Page a Content Block is on
  • Usage data is lazy-loaded when the Used on tab is selected to minimise its performance impact
  • Ability to click on a row and navigate to the most relevant CMSEditLink()
  • Removal of draft badges
  • Styling tweaks such as reduced padding

Your project specific DataObjects will automatically be displayed on this Used on tab. This may not always be desirable, especially when working with background DataObjects the user can not interact with directly. It is recommended you view the CMS Developer Guide for more information on this change, see the File Usage section.

Experimental support for PHP 8

You can now run Silverstripe CMS on PHP 8, which is due for release in November 2020. PHP 8 includes many exciting new features like named parameters, attributes, and union types. There are a few important caveats to keep in mind if you plan to adopt PHP 8 at release.

Upgrading to PHP 8 on projects using SapphireTest for unit testing requires adoption of the sminnee/phpunit fork, and Prophecy is not currently supported. Prophecy tests can be fairly trivially ported to PHPUnit Mock Objects. We hope to give you better support for choosing your own testing tools, including newer versions of PHPUnit, in a future release.

Support for PHP 8 does not yet extend to non-core modules, and PHP 8 itself is not yet stable, so compatibility issues could arise in future PHP builds. This extends to dependencies of core, many of which have not yet declared support for PHP 8, so you will need to run Composer with the --ignore-platform-reqs flag for the time being.

Finally, support for the new JIT functionality has not yet been tested.

We encourage early adopters to report any issues running CMS Recipe 4.7.0 against PHP 8 on the relevant GitHub repository.

Support for Symfony 4 Components

Symfony 3 will become unsupported early next year, so Silverstripe CMS is now forwards-compatible with Symfony 4 components. This is a largely transparent upgrade, but you may encounter errors related to strings starting with % in YML files, which can be easily rectified by wrapping all affected strings in quotes.

If you'd rather retain the previous YAML parser for the time being, you can run composer require symfony/yaml:^3 on your project to prevent the update to version 4.

Default MySQL collation updated

New projects based on silverstripe/installer will default to the utf8mb4_unicode_ci collation. This change will not affect existing projects, but developers are encouraged to adopt this collation as it provides better support for multi-byte characters such as emojis.

Depending on the version of MySQL you are running, you may encounter issues with Varchar fields exceeding the maximum indexable size:

  • MySQL 5.5 and lower cannot support indexes larger than 768 bytes (192 characters)
  • MySQL 5.6 supports larger indexes (3072 bytes) if the innodb_large_prefix setting is enabled (not by default)
  • MySQL 5.7 and newer have innodb_large_prefix enabled by default
  • MariaDB ~10.1 matches MySQL 5.6's behaviour, >10.2 matches 5.7's.

You can rectify this by upgrading MySQL, enabling the innodb_large_prefix setting if present, or reducing the size of affected fields. If none of these solutions are currently suitable, you can remove the new collation configuration to default back to the previous default collation.

MySQL connection mode now configurable

In MySQL versions >=5.7.5, the ANSI sql_mode setting behaves differently and includes the ONLY_FULL_GROUP_BY setting. It is generally recommended to leave this setting as-is because it results in deterministic SQL. However, for some advanced cases, the sql_mode can now be configured on the database connection via the configuration API (see MySQLDatabase::$sql_mode for more details.)

Flysystem dependency shifted

Previously the Flysystem package was pulled in via the silverstripe/framework module, but only used in the silverstripe/assets module. To make this dependency clearer, it has been added to the silverstripe/assets module and removed from silverstripe/framework. Most developers should not notice any issues, but if you depend on Flysystem in your own project code, you should ensure that you have it specified in your composer.json.

An edgecase exists where a project can update to silverstripe/framework 4.7.0 but remain on silverstripe/assets 1.6.x, and lose the Flysystem dependency entirely. The best way to avoid this is by ensuring you update all core modules to the new minor release at once, ideally through a core recipe like silverstripe/recipe-core.

Change Log

API Changes

  • 2020-10-02 e21ad30 Introduce hooks to help components figure out what tab they are in. (Maxime Rainville)
  • 2020-09-17 ff18dec2e Add new behat method for interacting with toasts (#9695) (Maxime Rainville)
  • 2020-08-20 b810b7d5c Allow for user-created objects to have values passed in the constructor (#8591) (Sam Minnée)

Features and Enhancements

  • 2020-11-02 b3cb347 Update translations (Maxime Rainville)
  • 2020-11-02 74e7546 Update translations (Maxime Rainville)
  • 2020-11-02 6ae5194 Update translations (Maxime Rainville)
  • 2020-11-02 a8d9bea44 Update translations (Maxime Rainville)
  • 2020-11-02 30cf78d Update translations (Maxime Rainville)
  • 2020-11-02 96e598f Update translations (Maxime Rainville)
  • 2020-11-02 b1b3a7c Update translations (Maxime Rainville)
  • 2020-11-02 af300867 Update translations (Maxime Rainville)
  • 2020-11-02 7b66e70c Update translations (Maxime Rainville)
  • 2020-11-02 e23c4861 Update translations (Maxime Rainville)
  • 2020-11-02 565504b Update translations (Maxime Rainville)
  • 2020-11-01 29e08365 Exclude FileLink's using a different extension hook (#1139) (Steve Boyd)
  • 2020-10-29 f40bbdc Improved file used on table data (Steve Boyd)
  • 2020-10-28 6e77d5ead DataObject related objects service (Steve Boyd)
  • 2020-10-23 91f831cd0 Improve scalar response handling (Garion Herman)
  • 2020-10-22 f00f64120 Allow setting sql_mode via config (#9721) (Bernard Hamlin)
  • 2020-10-15 b17f5fda Switch to using toast instead of form alerts (#1111) (Maxime Rainville)
  • 2020-10-14 481546a Extension to exclude ChangeSetItem from used on table (Steve Boyd)
  • 2020-10-12 941df19e8 Improve YamlReader exception message (#9731) (wernerkrauss)
  • 2020-09-25 4bf71d3 Replace E_USER_ERROR errors with exceptions (Robbie Averill)
  • 2020-09-25 9b9e673e Replace E_USER_ERROR errors with exceptions (Robbie Averill)
  • 2020-09-25 27bd5d12e Replace E_USER_ERROR errors with exceptions (Robbie Averill)
  • 2020-09-25 d17f0586 Replace E_USER_ERROR errors with exceptions (Robbie Averill)
  • 2020-09-25 cc4db4b Replace E_USER_ERROR errors with exceptions (Robbie Averill)
  • 2020-09-23 ba2aad5 Show icons on tabs with invalid form field values (Steve Boyd)
  • 2020-09-23 70afbc9 Confirm PHP 8 support (Sam Minnee)
  • 2020-09-23 c2128b4 Introduce PHP 8 and prefer-lowest builds (Garion Herman)
  • 2020-09-22 1921110 Confirm support for PHP8 (Sam Minnee)
  • 2020-09-22 f267081 Confirm support for PHP8 (Sam Minnee)
  • 2020-09-21 abfb75d Implement Toast notification in react (#1068) (Maxime Rainville)
  • 2020-09-18 7477435 Allow symfony 4 (Sam Minnee)
  • 2020-09-18 9247bc8b7 Add Symfony 4 support alongside Symfony 3 (Sam Minnee)
  • 2020-09-18 d9f0dd1 Add attention icon for tab validation errors (Sacha Judd)
  • 2020-09-14 b17eb61 Extension points for isOnDraft() and isPublished(). (Mojmir Fendek)
  • 2020-09-07 24dfe0b02 Add --prefer-lowest to PHP 7.1 build (Sam Minnee)
  • 2020-08-30 b3dd27953 Allow league/csv ^9 (Sam Minnee)
  • 2020-08-29 08010d593 Support namespace tokens in ClassInfo::parse_class_spec() (Garion Herman)
  • 2020-08-27 699913406 Added a dev view to output the current config from dev/config (#9542) (Jackson Darlow)
  • 2020-08-27 a7416f1 Prevent using Page_Controller Requirements (Steve Boyd)
  • 2020-08-26 680adbd10 Add recipe-core to default VersionProvider module list (Garion Herman)
  • 2020-08-25 7c84171d5 Improved task runner UI. (#9540) (Mojmir Fendek)
  • 2020-08-25 ed73b827 Set VersionedProvider labels for recipe-core and recipe-cms (Steve Boyd)
  • 2020-08-20 732d448 Show the type of save that was performed for the record instead of just showing either Saved/Published. (#279) (Andre Kiste)
  • 2020-08-16 a3b5ab5 Add test for stateless semantics of isDraft and isPublished (Sam Minnee)
  • 2020-08-12 7304acb17 Cache embed shortcodes (Steve Boyd)
  • 2020-08-11 e19ef240f VersionProvider now supports recipes as well as modules (Steve Boyd)
  • 2020-08-05 c2ed6a4cd WithMockTime callback. (Mojmir Fendek)
  • 2020-07-23 65befd0 Extension points for version lookup. (Mojmir Fendek)
  • 2020-07-02 0d7c5a9ec Add/remove callbacks on RelationList (Sam Minnee)
  • 2020-06-30 57d75c89d Added onAfterBuild (#9545) (Jackson Darlow)
  • 2020-05-26 5269e9d9 Last modified date for assets in list view table are now formatted according to browser locale (Robbie Averill)
  • 2020-02-17 2b3f986 Make dark mode support optional (Elliot Sawyer)
  • 2019-08-02 f57d5cc80 Test coverage for MySQL connection collation (Serge Latyntcev)
  • 2019-06-14 4d5d7a34a Add FilterInterface and retrofit into URLSegmentFilter (Robbie Averill)
  • 2019-04-14 91591373d Add exists as a method to the DataQuery API that will generate an SQL "exists" query (Guy Marriott)
  • 2018-12-07 b57dcfb Allow descriptions to be added as titles on SingleSelectField (Guy Marriott)
  • 2018-10-05 9b1350e Set default database charset to utf8mb4 (Sam Minnee)

Bugfixes

  • 2020-10-28 15efb09 Hide TabNav when only one Tab is present (Maxime Rainville)
  • 2020-10-23 e89ae93ac Harden hasMethod() against invalid values (Garion Herman)
  • 2020-10-21 f9c26cef Fix parsing error on CMSSiteTreeFilter (Maxime Rainville)
  • 2020-10-20 8a16d708 Use Live stage to fetch results during SearchFormTest (Garion Herman)
  • 2020-10-20 a452e79d Escape % to work with Symhony 4 (Maxime Rainville)
  • 2020-10-20 96281e71 Escape % to work with Symhony 4 (Maxime Rainville)
  • 2020-10-20 b24dc7349 Escape % symbole for Symphony 4 (Maxime Rainville)
  • 2020-10-20 2fcac0a Adjust search form widths to prevent date cutoff (Steve Boyd)
  • 2020-10-19 7727d10 Patch Entwine to ignore missing methods in one() (Garion Herman)
  • 2020-10-15 aaf4fb4d Remove broken RESOURCES_DIR test (Maxime Rainville)
  • 2020-10-14 fe08b1f3 Button alignment tweaks (Steve Boyd)
  • 2020-10-12 73460f9e remove old syntax from meta tag label (brynwhyman)
  • 2020-10-12 e089b79 Refactor Prophecy tests to PHPUnit Mock Objects (Garion Herman)
  • 2020-10-12 58ed42665 TinyMCEConfig image size presets handle incorrect values (Serge Latyntcev)
  • 2020-10-08 c5d676fa4 Avoid test failure on use of narrow-NBSP (#9725) (Sam Minnée)
  • 2020-10-07 635d7a7 Refactor Prophecy tests to PHPUnit Mock Objects (Garion Herman)
  • 2020-10-06 198b25c90 Hardcode PasswordValidator config in VersionedMemberAuthenticatorTest (Garion Herman)
  • 2020-10-06 7f6a5a8 Adapt React components to Reactstrap 8 upgrade (#1128) (Steve Boyd)
  • 2020-10-05 114d9d7 Address regression caused by reactstrap upgrade (Steve Boyd)
  • 2020-10-05 0fcda80f URL segment filter correction for CMS page search. (Mojmir Fendek)
  • 2020-09-30 8ad4c4e02 Fix namespace parsing under PHP 8, tweak readability of parser (Garion Herman)
  • 2020-09-29 3bcc569 Remove canPublish check for users to see unpublish button (fixes #300) (Loz Calver)
  • 2020-09-24 11364a6 Add missing translation strings (Steve Boyd)
  • 2020-09-22 890bd1e Remove invalid yaml duplication (Sam Minnee)
  • 2020-09-21 6035ccd Add redirects to public/ for iis (#263) (Manuel Thalmann)
  • 2020-09-21 60482f9 Temporary fix to use the most up-to-date version of chromedriver (#1114) (Maxime Rainville)
  • 2020-09-18 8b3ef8f85 recipe-testing is only needed for behat. (Sam Minnee)
  • 2020-09-16 33b0003b Strip html tags from file upload error responses (Steve Boyd)
  • 2020-09-15 edbe5ad0 Remove old boostrap 3 CSS class (Maxime Rainville)
  • 2020-09-15 acce4c4ce Remove old boostrap 3 CSS class (Maxime Rainville)
  • 2020-09-15 7193602 Revert vertically align form description contents (Steve Boyd)
  • 2020-09-11 2143660c3 Add class_exists() guards to SapphireTest (Sam Minnee)
  • 2020-09-10 ac6f34846 Resolve issue where TreeMultiSelectField would error loading its value (#9604) (Damian Mooyman)
  • 2020-09-10 fc9bf93 UI related changes moved from Versioned to Versioned Admin. (Mojmir Fendek)
  • 2020-09-10 fa4908a UI related changes moved from Versioned to Versioned Admin. (Mojmir Fendek)
  • 2020-09-10 8bcfa5734 Make PasswordEncryptor::check more resistent to timing attacks (Maxime Rainville)
  • 2020-09-10 80d1bdf Don't include the .cow folders in releases (Maxime Rainville)
  • 2020-09-10 acdebcdba Fix unit test (Maxime Rainville)
  • 2020-09-10 02827a667 Problem with direct compare in SELECT statement causing incompatibility with SQL Server database (Steve Boyd)
  • 2020-09-09 27c1c7291 ModuleManifest::getModuleByPath fix to ensure right module is returned (#9569) (Nicolaas)
  • 2020-09-08 85252ca05 Ensure Embed options are always array (Sam Minnee)
  • 2020-09-07 adaf793dd Always validate Member credentials against DRAFT stage (#9671) (Maxime Rainville)
  • 2020-09-07 099ee2deb Remove extraneous @depends annotations (Garion Herman)
  • 2020-09-04 f1c94e6d5 Allow quotes in expected ReflectionExceptions within tests (Garion Herman)
  • 2020-09-04 44685eceb Support PHP 8 namespace tokens in i18nTextCollector (Garion Herman)
  • 2020-09-04 bad066229 Disable libxml_disable_entity_loader() calls in PHP 8 (Garion Herman)
  • 2020-09-03 53b24ff Prevent exception when parent does not have breadcrumbs (Steve Boyd)
  • 2020-08-31 39b8d146 Unpublish permission decoupled from publish permission. (Mojmir Fendek)
  • 2020-08-30 fb9e6e51a Switch to sminnee fork of phpunit 5.7 (Sam Minnee)
  • 2020-08-30 57bdef3b2 Fix test mistakenly labelling content as name arguments in data provider (Sam Minnee)
  • 2020-08-30 09fb33e65 Avoid passing non-class to get_parent_class() (Sam Minnee)
  • 2020-08-30 5cb3d07f4 Avoid pass-literal-by-reference warning in PHP 8 (Sam Minnee)
  • 2020-08-29 622cf8b91 Drop parameter names in Injector instantiation to preserve behaviour in PHP 8 (Sam Minnee)
  • 2020-08-29 e0f379748 Remove deprecated & non-functional default argument config (Sam Minnee)
  • 2020-08-26 37b8da3 Fix ModelAdmin slug flex when getManagedModels() is overridden. (Sam Minnee)
  • 2020-08-25 c5a96a2a Flush embed shortcode provider cache on SiteTree write (Steve Boyd)
  • 2020-08-21 7377d094c Include missing security page titles when CMS not installed (fixes #9648) (Loz Calver)
  • 2020-08-20 abd0f3fbf Fix DataList->column mutating underlying DataQuery (Mason Dechaineux)
  • 2020-08-18 afc460c Reorder model tabs (Steve Boyd)
  • 2020-08-16 6175786 Decouple test setup. (Sam Minnee)
  • 2020-08-14 d2312ac Show Untitled when blank title (Steve Boyd)
  • 2020-08-13 624edbe Consistent timestamp fix for versions during publish recursive. (#292) (Mojmir Fendek)
  • 2020-08-13 754b4058 Top margin adjustment for file link insert message (Steve Boyd)
  • 2020-08-10 4c509c1 ListContents no longer called recursively (#415) (Adrian Humphreys)
  • 2020-08-07 4b5d2c3cc Fix GroupedDropdownFieldTest::testReadonlyValue (#9637) (Maxime Rainville)
  • 2020-08-06 e31565cb7 Fix GroupedDropdownFieldTest::testReadonlyValue (Maxime Rainville)
  • 2020-08-06 896c0e438 Use proper ellipsis character in the various summary method. (Maxime Rainville)
  • 2020-08-06 31fa2624 Honour URL suffix on URL Segment field (Maxime Rainville)
  • 2020-08-06 0ed40e9b0 only use HTTPS link on the default controller template (Maxime Rainville)
  • 2020-07-28 eee32b6e Make the file upload progressbar smooth (Maxime Rainville)
  • 2020-07-19 9a06d33 Add links to userhelp (Steve Boyd)
  • 2020-07-14 f13c928b1 Fix _images pathing (Aaron Carlino)
  • 2020-07-14 0d2a9da0d Fix file icon URL (Aaron Carlino)
  • 2020-07-08 b39f0ba Decouple ModelAdmin URL slug from class. (Sam Minnee)
  • 2020-07-06 c32cba5 Fix semantics of isPublished(), isArchived(), isOnDraft() for objects without draft/published stages (Sam Minnee)
  • 2020-07-03 3bf89b2d1 Try Catch for embeded media (#9424) (rdigitalg)
  • 2020-07-02 75f1936 Localise login screen (#61) (Maxime Rainville)
  • 2020-06-29 d609c02 Revert "Disable uneeded File ID Helper on new project" (#59) (Maxime Rainville)
  • 2020-06-16 f67766b Ensure graphql URL is inserted before admin (Sam Minnee)
  • 2020-06-12 2e0e04f70 fix deprecation notices (Andrew Aitken-Fincham)
  • 2020-05-27 27231bf Treat login-forms as a core module (Maxime Rainville)
  • 2020-05-01 0e89d48 Fix URL anchors not selecting tabs (bergice)
  • 2020-03-16 5e2c9db Use .silverstripe-cms-logo in place of svg to target logo (Garion Herman)
  • 2020-02-18 eca0e24 Drop uppercase S in Composer requirements (Garion Herman)
  • 2020-02-18 671bb6e Remove composer extra composer key (Maxime Rainville)
  • 2019-08-26 01d3b4fd9 Set many-many-through joinRecord on newly added records. (Sam Minnee)
  • 2019-04-26 3575070b9 Removing selected column detail only if having is empty (MySQL "feature") (Guy Marriott)
  • 2019-04-17 f9fc4f664 Allow for BC for DB adapters that return an actual boolean when selecting boolean literals in SQL (Guy Marriott)
  • 2019-04-16 ef0af7ae9 Exists statements can't remove GROUP BY if there's a HAVING clause as it might rely on an aggregate (Guy Marriott)
  • 2019-03-29 da65083 Minor improvement to SingleSelectField story (Maxime Rainville)
  • 2019-03-08 bca0f28b6 Make template parser error on mismatched brackets (fixes #8845) (Loz Calver)
  • 2019-03-08 bfc3b4b46 Stop empty comments breaking the template parser (fixes #8742) (Loz Calver)

Documentation

  • 2020-10-12 79a03b2b0 Add upgrade note about Flysystem dependency shift (Garion Herman)
  • 2020-10-09 1837c1983 Add note about creating provisional changelogs following minor releases (Garion Herman)
  • 2020-10-09 d8b725dc8 Add provisional 4.7.0 changelog [ci skip] (Garion Herman)
  • 2020-10-08 9a1959607 RFC-9687 Commit Prefixes conventions (Serge Latyntcev)
  • 2020-10-04 c2d8d2790 Document partial template caching aggregates recommendation (Serge Latyntcev)
  • 2020-09-17 074623017 Add process for releasing individual module patches (#9626) (Garion Herman)
  • 2020-09-12 13725d2f9 HistoryViewer: explain "magic names" (#9670) (cloph)
  • 2020-09-10 2c1cb7915 Example of partial cache expiry setting. (Mojmir Fendek)
  • 2020-09-10 a5c1a86dc Clarify the security pre-announcement mailing list usage (Serge Latyntcev)
  • 2020-09-10 d9c0b079d Fix Partial Template Cache documentation header (Serge Latyntcev)
  • 2020-09-10 2753f823e Added a tip to docs describing how to set a cookie for less than a day (#9552) (Jackson Darlow)
  • 2020-09-09 c072f7343 Add triage resources, document stale PR definition (#9660) (Garion Herman)
  • 2020-08-26 d76bd7d more information in changelog template (brynwhyman)
  • 2020-08-20 f8b4570cb MFA authentication (#9536) (Ingo Schommer)
  • 2020-08-13 fb5bec58a Drop broken syntax from Overview header in 4.6.1 changelog (Garion Herman)
  • 2020-08-05 9f94c739c Correct the example for getters/setters (Maxime Rainville)
  • 2020-07-29 4a45338c6 Per-project issue tracking shortcut (#9554) (Ingo Schommer)
  • 2020-07-29 d19cc1e99 Tracking releases (Ingo Schommer)
  • 2020-07-29 b6169a87c HTTP header in server requirements (Ingo Schommer)
  • 2020-07-23 5fb7ef0bc Remove links to common problems (Aaron Carlino)
  • 2020-07-21 b96133651 PHP 7.4 support (brynwhyman)
  • 2020-07-21 8f1167b45 add a 4.6.0 known regression (#9603) (Serge Latyntsev)
  • 2020-07-07 ec58dad05 add 3.7.4 changelog to 4 (brynwhyman)
  • 2020-07-03 92f4f1fa1 Update PHP support info (Patrick Nelson)
  • 2020-07-01 6446b50c4 Add Cheddam to the core committers (Robbie Averill)
  • 2020-06-30 87c041b92 Add extra information on how to customise a file HTTP response (Maxime Rainville)
  • 2020-06-29 993f1fd75 Add details about the recommended community support options (Guy Marriott)
  • 2020-06-29 4782e8e Detail that mimevalidator is now a part of core (#40) (Serge Latyntsev)
  • 2020-06-03 5fe5833fb MFA authentication (Ingo Schommer)
  • 2020-06-02 a2bdd1ca8 fix broken link in changelog (brynwhyman)
  • 2020-05-28 4303917ac Form::loadDataFrom constants in docblock (Christopher Darling)
  • 2020-05-28 44776a0e3 Add file status icons to change log (#9522) (Steve Boyd)
  • 2020-05-27 273f70d Clean up login-forms README (Maxime Rainville)
  • 2020-05-27 0f5c5d14c Show beta changelogs on doc site (#9523) (Maxime Rainville)
  • 2020-05-21 e632ee3e5 Update Partial Template Cache documentation (Serge Latyntcev)
  • 2020-05-11 04a45a7 Move configration info to core documentation (Maxime Rainville)
  • 2019-10-07 4ee710276 Update breadcrumb template in theme rather than app. (Maxime Rainville)

Dependencies

  • 2020-10-08 a7aa355 Add explicit dependency on league/flysystem (Garion Herman)
  • 2020-10-08 256bd5355 Remove unused league/flysystem requirement (Garion Herman)