SilverStripe 4.0.0-alpha5 is out. Get a copy in our download section and tell us what you think about it!
“She grows up so fast. I’m getting a little teary.”
The Open Sourcerers team have worked their magic again, taking us one step closer to a beta release. Many big changes have been made in the background, and usability on the admin interface has been improved.
As with any alpha release, which is not a standard release, we do not recommend using this build for any production websites. Anyone is free to try this release out and feedback about any issues is welcome. Your assistance will get us nearer to a more bug-free release when we go stable.
Important notes
Since this is an alpha release, there are changes in our API that could potentially break a current setup. Here are some critical ones that may be difficult for you to figure out, so we outline them here:
I18n localisation now uses php-intl
Our i18n library has an important dependency added in, which may not be installed on your server/development environment. It’s important to make sure that this dependency is installed before you upgrade to alpha5.
There are some great guides around:
- MacOS users can install this with the help of homebrew
- Linux users can use their favourite package manager (or other package manager).
- Also, there are excellent guides for Windows, such as for XAMPP users
Other enhancements to i18n include full support for non-English pluralisation rules, meaning better dynamic localisation of strings and objects.
Switch to dotenv
We no longer support the _ss_environment.php file for environment configuration, and have shifted to a more accepted dotenv environment variable file.
That means any lines in _ss_environment.php like define('SS_ENVIRONMENT_TYPE', 'dev'); will need to be converted to something like this in a file named .env
SS_ENVIRONMENT_TYPE="dev"
Lastly, make sure that .env is ignored in your source control.
Config rules
The config rules in yaml files have be made more strict, we advise removing any After: *. In the extreme case where if you really need something that goes after everything (except one important CMS module rule), change it to this:
Before:
- '#modelascontrollerroutes'
DateField API
The DateField has had some methods removed, in place of more descriptive names so that it's clear exactly what is happening.
This means that DateField::setConfig() and DateField::getConfig() will need to be converted to the new methods.
For example: $date->setConfig('showcalendar', true); becomes $date->setShowCalendar(true);
On to the fun stuff: new features!
Drag & drop files
Files can now be dragged into or out of folders. You can also select multiple files to move them all at once.
New caching system
We’ve updated our caching system to conform with a PSR-16 standard implementation. This helps reduce future upgrading pains and opens the door to improve performance. This also means that injecting a new caching system for your SilverStripe website will be easier. This doesn’t include the config manifest cache as that is loaded during the time framework is booting up, but it’s a step closer to getting there.
New config system
SilverStripe 4 has switched to using a config module to handle config, getting a full face-lift and refresh, adding more modularity to our ecosystem. The config system comes with a few API changes, most notably, the update() is now split into set() and merge() methods.
This helps improve our caching logic for the config system, resulting in slightly improved performance in day-to-day usage.
GraphQL scaffolding
GraphQL scaffolding has been implemented. This allows you to quickly and easily configure your custom DataObjects for standard CRUD operations using YAML configuration in the silverstripe-graphql module, without the need to write a whole set of new classes. It is now much easier for developers to jump in and use the GraphQL API, especially favoured by frontend React developers.
Aesthetic fixes
- Model Admin regressions fixed
- Form buttons now show for smaller screens (in particular the Insert Media modal)
- UploadField has re-instated disable/readonly modes
Conclusion
Many thanks to all contributors who have helped push features along and everyone who has provided feedback. We appreciate your help.
4.0.0-alpha5 includes many big changes in the background, mostly focused on code maintenance and followed closely by performance. The number of API changes is getting smaller now, so we are anticipating a beta release soon. A beta release means that any API changes will be critically discussed and unless it is necessary, they will not happen.
For more details on changes made, please see our change log.