Find out what's new in SilverStripe 3.2
Going over what's new in SilverStripe 3.2, when you can get your hands on it and how you can help 3.2 reach stable release!
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
An introduction to SilverStripe 3.2
2. SilverStripe 3.2
11 June, 2015 • London • Dan Hensby (@dhensby)
What’s new in 3.2 and how you can help us launch
An introduction to
3. What’s new in 3.2?
● Big changes
● PHP min version bumped to 5.3.3 (from 5.3.2)
● Parameterised DB queries! PDO connector now
standard (use it!)
● SiteConfig and Reports moved to separate
modules
● Introduced “Archive” concept for pages (superseding
“delete from draft”)
It’s rhyme time
11 June, 2015 • London • Dan Hensby (@dhensby)
See the changelog: bit.ly/ss32changes
4. What’s new in 3.2?
● Lots of minor changes and improvements
● FormField::validate() implemented more
consistently
● Speed improvements (Config caching - LRU
replaced with Key-Value store)
● DataObject changed fields constants added
(CHANGE_STRICT, CHANGE_VALUE, CHANGE_NONE)
● $FromEnd template helper added
● Various UX improvements like a fancy new loader
GIF11 June, 2015 • London • Dan Hensby (@dhensby)
See the changelog: bit.ly/ss32changes
8. What’s old in 3.2?
● Removed
● <% control %> syntax in templates (use loop)
● Profiler class
● Member login tracking
● DataExtension BC with 2.4 (extraStatics(), etc
removed)
● A few more minor classes
● Deprecated (still works, but will be removed later)
● Config setters
● DB class functions brought inline with naming
Things that are gone (or going)
11 June, 2015 • London • Dan Hensby (@dhensby)
9. How hard is it to upgrade?
● MySQLDatabase seems to have some memory issues - use MySQLPDODatabase
● Big re-write - lots of changes - see the changelog for
a complete guide
● Prepared queries - *droooool*
● SQLSelect, SQLDelete, SQLUpdate and SQLInsert
Effort involved to move to 3.2
11 June, 2015 • London • Dan Hensby (@dhensby)
10. How hard is it to upgrade?
● Form IDs have had various fixes
● IDs for FormFields are now “namespaced” to reduce
ID collisions
● Forms no longer produce invalid IDs
● Removed duplicate IDs from inputs and their parent
div
● Upgrade pain for projects that rely on Form/Field IDs
● Legacy support for anyone who needs old
behaviour:
Effort involved to move to 3.2
11 June, 2015 • London • Dan Hensby (@dhensby)
11. Wait, aren’t we SemVer now?
● SemVer defines a specification for versioning
● Major . Minor . Patch
● Composer replies on SemVer (~3.2.1 means 3.2.x - low risk upgrades)
● Officially adopted in late 2014
● First minor release since then
● Upgrading should be relatively smooooth
Our first “minor” release since adopting Semantic Versioning
11 June, 2015 • London • Dan Hensby (@dhensby)
See semver.org for specifications
14. How can you help?
● Get using it
● composer create-project
silverstripe/installer:3.2.x-dev www
● Upgrade a project you’re currently developing (with release a month or so away)
● composer require silverstripe/cms:3.2.x-
dev --update-with-dependencies
● Submit tickets to /issues
● Submit patches and improvements to /pulls
Getting to RC1 quickly
11 June, 2015 • London • Dan Hensby (@dhensby)
Core committer - I have the power to take in PRs and make changes to the code-base
Now working at SilverStripe UK (London Office)
Solutions Architect
Supporting Joel in his role
Providing support to SS Partners
Helping the community
There’s been a few “big changes”
PHP bump, shouldn’t be a big deal, who runs 5.3.2 anyway?
A big overhaul to the DB connectors to use parameterised queries. Lots more secure and, theoretically, should be faster.
Site config and Reports have been split out into their own modules - if you upgrade with composer, these will be added automatically
Big change to CMS to “Archive” pages in a single step, rather than deleting from both Stage and Live
This stops pages getting “lost”
Manages expectation of the user, before it was easy to think a page was deleted when it was only deleted on the draft site
It’s a simpler workflow - one step, not two.
There have been lots of small feature enhancements
Most shouldn’t affect your daily use of SS
Work has been done to increase speed, one such improvement was to how we cached Config settings
Nice tweaks like named constants for $do->getChangedFields() (rather than magic numbers)
`$FromEnd` (like the inverse of $Pos)
UX improvements to the CMS, like auto collapsing left hand menu, spinner for gridfield autocomplete field, and more
Oh and a fancy new GIF!
Most removals have been done via Deprecation (the old way still works, but you should use the new way)
Some items have been removed, but these are old-school issues that should have been upgraded as part of 3.0 -> 3.1
Member login tacking was removed as it had a performance penalty for no real gain and lead to multiple DB calls per request - it was an obstacle to read-only sites
Lots of function renaming, eg: DB::getConn -> DB::get_conn
Huge scale re-write of the DB query layer, splitting out into SQLSelect, Delete, Update and Insert
Lots of effort to keep SQLQuery backwards compatable
3.1 has a bug where form will have ID collisions in the HTML, this has been resolved and other invalid characters that found their way into HTML IDs have been fixed
This will be a pain point if you rely on IDs for JS or CSS (if you do, stop it) - you should use classes, use $field->addExtraClass(‘js-this-thing’);
This is our first minor release since adopting semver in late 2014
In short, SemVer dictates that changes to code can only go into each version part depending on their impact.
Breaking changes (removing code, changing the type of data a function returns, etc) can only go in a Major release
New features or changes that are implemented in a BC way go into Minor
Bug fixes go into Patch
This gives a lot more certainty to developers about what risk is involved.
That makes this release a half-half semver compliant; there will be some breaking changes, but hopefully the last minor release that does
We really need help to make sure it’s stable and bug free
Try it out by starting a new project and testing
Upgrade a current project
How many people are already using it (3.x-dev or 3.2.x-dev)?
Submit tickets or patches (if you find a bug) to GitHub :)
The more people that use it, the better