Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

 

4.0.0-beta4: A fantastic release

SilverStripe 4.0.0-beta4 has been released! This marks the end of the beta development cycle and the beginning of the release candidate cycle. See what the Open Source team have been working on in this beta4 release.

Read post

With the release of SilverStripe 4.0.0-beta4, we've put the entire beta phase of development behind us. From here on, we embark on the release candidate (RC) cycle, which, for practical purposes means that no new features or APIs will be added, and the software is expected to be free of major bugs.

This was the final window of opportunity to add new stuff to SilverStripe 4, and we closed it in a blaze of open-source glory. Check it out:

Vendor bender

Dude, where are my folders?!

You, upon installing beta4.

When you install this release, you might notice that your web root is looking rather... sparse. That's because this release of SilverStripe includes a hallmark feature that the community has been wanting for a long time. SilverStripe modules are now first-class vendor/ modules. That means less pollution of your web root, and much more simplified exclusion of modules from version control (vendor/ is excluded by default). Vendor modules remain opt-in for third party modules.

For module developers, simply define "type": "silverstripe-vendormodule" in your composer.json to reap the benefits of a cleaner directory tree. If you're pulling assets such as CSS and Javascript into your module, you'll have to use the new module-aware Requirements API instead of hardcoding file paths. Since direct web access to the vendor/ folder is denied for security reasons, you’ll need to declare public assets in your composer.json. The composer installation process will automatically symlink or copy them into a new auto-generated resources/ folder.

We've taken this a step further and demonstrated that SilverStripe 4 can put its webroot in a public subfolder. How awesome!

Changes to your .htaccess

We've moved to index.php-based serving of your responses, replacing framework/main.php. This brings us more in line with best practice, and allows for more fine grained customisation of the bootstrap process (check out the default .htaccess and index.php). This means this file needs to be created, and your .htaccess file needs to be adjusted. We've written a handy script for this:

composer global require silverstripe/upgrader
cd ~/Project/Root
~/.composer/vendor/bin/upgrade-code doctor

If you are upgrading from an earlier 4.x release, please ensure you are using the new recipe-core in your composer.json instead of directly referencing silverstripe/framework there (check the installer's composer.json). Read our changelog for more details.

Other housekeeping

In addition to the major change to the way modules are installed, this release gave us an opportunity to address a lot of performance, UX, and general tidiness issues. Most significantly, we've rebuilt the way the files gallery delivers thumbnails to the browser, which greatly reduces the chances of running out of memory. Further, we've cleaned up the React codebase to adhere more to conventions, making the code more accessible and extensible. Other improvements include ensuring extensions are loaded as singletons, and pixel-pushing UI tweaks all over the CMS.

For a full list of bug fixes and improvements, see the beta4 changelog.

We RC-ing the finish line.

Thanks to all of you in the community, particularly in the Slack channel who have been testing each release. The more feedback we have, the faster we'll progress through the RC phase and reach stable.

As always, if this is your first time moving into SS4, please visit the 4.0.0 upgrading guide and change notes: https://docs.silverstripe.org/en/4/changelogs/4.0.0.

To give 4.0.0-beta4 a try, run the following composer command:

composer create-project silverstripe/installer ./ss40 4.0.0-beta4

About the author
Aaron Carlino

Aaron Carlino, better known by his whimsical pseudonym Uncle Cheese has been an active member of the SilverStripe community since 2007, and has never looked back. In that time, he has established himself as a support resource, mentor, and contributor of some of the framework's most popular open source modules.

Post your comment

Comments

No one has commented on this page yet.

RSS feed for comments on this page | RSS feed for all comments

Like what you have read?

Sign up for our weekly blog digest sent to your inbox.

Subscribe