Skip to content

MDL-88495 [docs] Document phpunit snapshot, restore and upgrade commands - #1655

Open
lameze wants to merge 1 commit into
moodle:mainfrom
lameze:MDL-88495
Open

MDL-88495 [docs] Document phpunit snapshot, restore and upgrade commands#1655
lameze wants to merge 1 commit into
moodle:mainfrom
lameze:MDL-88495

Conversation

@lameze

@lameze lameze commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

What

Documents the new admin/tool/phpunit/cli/util.php commands added in Moodle 5.3 by MDL-88495:

  • --upgrade — upgrade installed plugins in the test environment in place, instead of a full init.php re-initialisation.
  • --snapshot[=NAME] — capture the initialised test database and filedir into 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 errors
  • cspell — 0 issues

Tracker issue: https://moodle.atlassian.net/browse/MDL-88495

🤖 Generated with Claude Code

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>
@netlify

netlify Bot commented Jul 27, 2026

Copy link
Copy Markdown

Deploy Preview for moodledevdocs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2d63e5c
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/6a66fe7fa6049f0008bc102d
😎 Deploy Preview https://deploy-preview-1655--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@brendanheywood

Copy link
Copy Markdown
Contributor

apart from the conflict this is looking good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants