SilverStripe 4 continues to grow and mature, as we push out our first minor release of this major version. This update includes many highly-requested features from the community, and addresses many use cases that arose since we released 4.0.0 late last year.
Public webroot
As the most major security feature implemented since protected assets, SilverStripe 4.1 will now allow all assets and site code to be stored safely away from the public webroot. Rather than relying on .htaccess rules or other server configuration to secure non-public resources, you can simply create a public
folder within your project, and set this as your webroot.
By default all new projects created with 4.1 will have a public folder created out of the box, but existing projects can have a public folder by upgrading.
For more information on the benefits of this new feature, and how to upgrade your website to ensure the best security, please check out the 4.1.0 upgrade guide.
Unversioned ownership
As requested, many features which once were restricted to versioned-only objects are now available for all classes; You can now use ownership to link trees of dependant objects, versioned or not, and publish them in complete changesets at one time.
E.g.
class Banner extends DataObject { private static $owns = [ 'Image' ]; private static $has_one = [ 'Image' => Image::class, ]; }
Recursive Duplication
Ownership is now useful not only for publishing of records, but also allows for configuration of duplication of trees of content. By default, any record with owns
will duplicate any exclusively owned content attached to it, ensuring that duplicated records are as complete as their original.
A new config cascade_duplicates
is now available in case that this logic should be customised on a per-record basis.
class Page extends SiteTree { private static $cascade_duplicates = [ 'Banners' ]; private static $has_many = [ 'Banners' => Banner::class ]; }
Better versioned record user interface
When working with records, either versioned, or containing versioned owned records, we have improved the GridField user interface to better communicate and ensure consistent publishing of content.
Records which have owns
will now have an updated save interface, as represented below:
When the record is saved, all draft objects attached to this record will be published automatically.
We have also added additional visual indicators for versioned records, both in the breadcrumbs, as well as in gridfields.
Pattern Library
Now available for UX and react developers is the new pattern library.
You can get this setup by installing 4.1.0 and running the following commands:
$ cd vendor/silverstripe/admin
$ yarn install
$ yarn pattern-lib
Storybook started on => http://localhost:6006/
Then you can start up the storybook in your web browser.
Checking out the upgrade
You can check out 4.1.0 with composer; Simply run the command below to get started.
composer create-project silverstripe/installer ./ss41 4.1.0
Don't forget to check out the 4.1.0 upgrading guide for information on upgrading your project.
To get announcements straight to your inbox for upcoming releases you can also subscribe to our release announcements on Google Groups.
Post your comment
Comments
No one has commented on this page yet.
RSS feed for comments on this page | RSS feed for all comments