MDL-88495 [docs] Document phpunit snapshot, restore and upgrade commands - #1655
Open
lameze wants to merge 1 commit into
Open
MDL-88495 [docs] Document phpunit snapshot, restore and upgrade commands#1655lameze wants to merge 1 commit into
lameze wants to merge 1 commit into
Conversation
Add documentation for the new admin/tool/phpunit/cli/util.php options introduced in Moodle 5.3: --upgrade, --snapshot, --restore and --list. These allow a test environment to be captured and restored quickly, significantly speeding up plugin CI pipelines by avoiding a full re-installation on every run. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for moodledevdocs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
apart from the conflict this is looking good |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Documents the new
admin/tool/phpunit/cli/util.phpcommands added in Moodle 5.3 by MDL-88495:--upgrade— upgrade installed plugins in the test environment in place, instead of a fullinit.phpre-initialisation.--snapshot[=NAME]— capture the initialised test database andfiledirinto a versioned.zip.--restore=NAME— restore a snapshot (much faster than a fresh install).--list— list available snapshots.A new Maintaining the test environment section is added to
general/development/tools/phpunit/index.md, covering the upgrade-in-place flow, snapshot create/list/restore, and an example CI workflow. The snapshot commands are tagged with<Since version="5.3" />.Why
Initialising the PHPUnit environment installs the full Moodle database, which dominates plugin CI run time. Snapshots let a vanilla install be captured once and restored almost instantly on later runs, taking a typical plugin CI run from minutes to seconds.
Checks
yarn mdlint— 0 errorscspell— 0 issuesTracker issue: https://moodle.atlassian.net/browse/MDL-88495
🤖 Generated with Claude Code