Skip to content

Fix managed multisite PHPUnit composition#2106

Open
chubes4 wants to merge 4 commits into
mainfrom
fix-2056-managed-multisite
Open

Fix managed multisite PHPUnit composition#2106
chubes4 wants to merge 4 commits into
mainfrom
fix-2056-managed-multisite

Conversation

@chubes4

@chubes4 chubes4 commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • preinstall managed MySQL multisite with wp-phpunit before enabling installed-network constants
  • explicitly materialize prepared extra plugins into Playground VFS before setup and workloads
  • preserve fresh structured diagnostics when multisite preinstall fails

Root Cause

The managed runner defined MULTISITE before wp-phpunit's installer could create and seed network tables. WordPress therefore queried blogs and sitemeta during bootstrap before those tables existed. Separately, prepared extra plugins were mounted but omitted from explicit staged-input materialization, so sibling dependencies were not guaranteed to exist inside Playground.

Implementation

  • Generate one shared managed wp-tests configuration for preinstall and normal execution.
  • Run wp-phpunit's existing install.php with run_ms_tests in a separate preinstall invocation that excludes current-network constants.
  • Keep the normal managed PHPUnit lifecycle unchanged after the network exists.
  • Initialize and persist preinstall throwable/fatal diagnostics through the normal structured result path.
  • Include generic prepared extra-plugin mounts in materializeStagedInputs() without consumer-specific knowledge.

Verification

  • npm run build
  • npx tsx tests/phpunit-project-autoload.test.ts
  • npm run test:recipe-runtime-setup-staged-materialization
  • npm run test:playground-phpunit-readonly-cache-integration
  • npm run check passed production-boundary enforcement, build, and generic primitives before stopping at the existing main-branch command-registry-smoke failure: wordpress.collect-workload-result outputShape should mention outputSchema id
  • npm run test:disposable-mysql-mysqli-e2e skipped because Docker is unavailable locally; CI provides the decisive MySQL coverage
  • git diff --check

Fixes #2056

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.

Managed MySQL PHPUnit multisite omits network tables

1 participant