Upgrading
XBackBone's application logic lives in the versioned xbackbone/core Composer package, while your deployment is the thin app skeleton. Upgrading (or rolling back) is therefore a matter of changing one version constraint and updating dependencies.
Why this is nice
Because the core is a package, your configuration, environment and customisations in the skeleton are untouched by an upgrade. You can also downgrade the same way if a release misbehaves.
Before you start
- Take a backup of your database and your uploaded files.
- Note your current version so you can roll back:
composer show xbackbone/core. - Put the site into maintenance mode if you want zero in-flight writes:
php xbb downUpgrade
Bump the constraint in the skeleton's
composer.json, e.g.:json{ "require": { "xbackbone/core": "^1.2" } }Update dependencies:
bashcomposer update xbackbone/core --with-all-dependenciesRun any new database migrations:
bashphp xbb migrate --forceRebuild the production caches:
bashphp xbb optimizeRestart your queue workers so they pick up the new code:
bashphp xbb queue:restartBring the site back up:
bashphp xbb up
Downgrade
Point the constraint at the older version and update again:
composer require xbackbone/core:^1.1 --with-all-dependencies
php xbb optimize
php xbb queue:restartMigrations are not always reversible
If the newer version added migrations that changed data, rolling the package back does not automatically undo them. Restore your database backup if a downgrade needs the old schema.
