Updating The Framework
Rhapsody includes a powerful set of console commands to make updating your application simple, safe, and automatic.
Automated Update Command
The recommended way to update your application is by using the app:update command. It orchestrates the entire update workflow to ensure a smooth deployment.
php rhapsody app:update
Update Workflow
The command performs the following steps in sequence:
- Enters Maintenance Mode: Puts the site into maintenance mode to prevent access during the update.
- Fetches Latest Code: Forcefully resets your local branch to match the remote repository, ensuring all new files (like
.env.example) are downloaded. - Updates Dependencies: Runs
composer install. - Syncs Environment File: Safely appends any new variables from
.env.exampleto your.envfile without overwriting your settings. - Runs Database Migrations: Applies any pending schema changes.
- Clears Caches: Flushes all route and application caches.
- Updates Version: Updates the
app_versionin yourconfig.phpfile. - Exits Maintenance Mode: Brings your application back online.
After Updating
After pulling the latest framework version, always run php rhapsody env:sync
to add any new environment variables required by the new version.
Upgrade Notes
Custom cache drivers
If you wrote your own driver implementing CacheInterface, update its method signatures to match the interface: get(string $key, mixed $default = null): mixed and put(string $key, mixed $value, int $minutes): void. A driver that omits the mixed return type on get() will fail to load. See Caching for the full interface.