Skip to content

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

Merged
traviswindsormoodle merged 1 commit into
moodle:mainfrom
lameze:MDL-88495
Sep 1, 2026
Merged

MDL-88495 [docs] Document phpunit snapshot, restore and upgrade commands#1655
traviswindsormoodle merged 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

@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 2afb69a
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/6a967346f16be10008a96299
😎 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

@brendanheywood

Copy link
Copy Markdown
Contributor

lgtm

@abhinavgandham

Copy link
Copy Markdown

@lameze This looks good to me as well.

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>
Copilot AI lite review requested due to automatic review settings September 1, 2026 06:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@traviswindsormoodle traviswindsormoodle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. Checked through changes and preview

@traviswindsormoodle
traviswindsormoodle added this pull request to the merge queue Sep 1, 2026
Merged via the queue into moodle:main with commit 97eade2 Sep 1, 2026
6 checks passed
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.

5 participants