Overview

This guidance expands on the Overview on CWP 2.x upgrades, Upgrading Guidance for Decision Makers, and the Upgrade Project Plan for Stack Managers and Tech Leads. It more detail on the technical steps and considerations required to perform an upgrade of your site to CWP 2.x. It is aimed as a starting point for developers.

Alternatively, you can download the full guidance at  CWP-2.x-Upgrading-Guide.pdf

Upgrade guide and changelogs

CWP 2.x is built on top of SilverStripe 4.x, but has additional functionality and modules. This means you need to read up about changes for both CWP and SilverStripe releases. Start off by reading about the high level technical changes in the SilverStripe 4 upgrading guide(external link). The main breaking changes are described in the CWP 2.0.0 changelog and SilverStripe 4.0.0 changelog(external link). Since then, we have been busy releasing new minor versions of both CWP and SilverStripe 4.x. Some of these releases add new functionality. For example, SilverStripe 4.1.0(external link) added support for a public/ folder, and CWP 2.1.0 added an installed modules report. You should always upgrade to the latest release, but those introduce non-breaking and opt-in changes only (our modules follow semantic versioning(external link)). You can see a full list of SilverStripe 4.x changelogs and CWP 2.x changelogs, and subscribe to the CWP Newsletter to stay in touch when new releases come out.  

Upgrader automation tool

A lot of the upgrade effort comes down to syntax and naming changes, which we’ve mostly automated through an upgrader tool(external link). It will assist you to:

  • 'recompose' your requirements

  • update your environment settings

  • namespace your code

  • update your code to use new APIs

  • become aware of issues by alerting you to any issues it may identify

  • relocate your web root assets

  • re-organise your project layout (more relevant with upcoming releases)

Considerations

There are a lot of decision points around upgrades which are less clear than renaming PHP classes. We’ve summarised these in the “Project Plan for Stack Managers and Tech Leads”. Here’s a quick summary about the topics you should discuss with your stakeholders leading up the the technical upgrade process:

Further reading

Last modified: