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.
Post your comment
Comments
Thanks for the feedback, it's a helpful reminder for myself.
Yes, there were a few people reporting these two issues, and I will amend them to the blog post.
The change log link was working for me over the weekend, if you're continuing to get 404 errors, please feel free to ping us (here or on Slack), I believe you may have already :)
Cheers
Posted by Christopher Joe, 13/03/2017 2:41pm (8 years ago)
Thanks for your blog post it helped me to successfully install and configure php-intl as well as migrate my _ss_environment.php to a .env file.
A couple of things it doesn't mention which I have found need changing in order to successfully upgrade:
- The use of Before: and After: blocks, which use the * wildcard, in YAML files causes 'circular dependancies' (as you mentioned yourself on Slack). I have had to remove my After: blocks entirely to resolve this. Still not clear on the root issue here so any explanation to hep me understand would be appreciated.
- DateField::setConfig() DateField::getConfig() methods have been removed and replaced with individual getter/setter methods for each config option i.e. $date->setConfig('showcalendar', true); becomes $date->setShowCalendar(true);
Also as Thomas has mentioned below, the Alpha5 change log link is still going to a HTTP 404, based on Vinh's response, it sounds like the content exists? Making the change log available would not doubt save developers lots of time upgrading.
Cheers,
HARVS1789UK
Posted by Joe Harvey, 10/03/2017 11:12pm (8 years ago)
Posted by Vinh Nguyen, 08/03/2017 10:46am (8 years ago)
What happened?
I hope that the beta is out soon. I can't wait for it.
Posted by Thomas, 08/03/2017 12:28am (8 years ago)
I also hope there will be video's on developing for SS4, cause it's a really big change compared to SS3. ... but of course it's still alpha...
Posted by guy van bael, 02/03/2017 9:06pm (8 years ago)
No one has commented on this page yet.
RSS feed for comments on this page | RSS feed for all comments