Skip to content

PHPUnit dependency mounts do not activate after database install #1881

Description

@chubes4

Problem

The canonical PHPUnit recipe accepts inactive extra_plugins plus dependencyMounts, but current main does not activate or replay callbacks for those mounted plugins after the managed PHPUnit database is installed. The plugin source is mounted and Composer autoload setup sees it, yet activation state and plugins_loaded behavior are absent during tests.

This regresses the contract introduced by PR #1868.

Evidence

The run confirms both plugins are projected into setup:

{
  "plugins": [
    "test-db-activation-host/test-db-activation-host.php",
    "bench-db-activation-dep/bench-db-activation-dep.php"
  ]
}

PHPUnit then reports all three lifecycle assertions failing:

  1. The dependency activation hook did not write its option.
  2. The dependency activation hook did not complete get_users().
  3. The dependency plugins_loaded callback did not fire.

Expected behavior

Plugins listed in dependencyMounts load and activate after wp-phpunit creates wptests_* tables, then callbacks registered for the dependency lifecycle execute exactly once before tests.

How to reproduce

  1. Check out Homeboy Extensions PR #2302.
  2. Check out WP Codebox main and build it.
  3. Point HOMEBOY_WP_CODEBOX_BIN and HOMEBOY_WP_CODEBOX_CORE_MODULE at that build.
  4. Run bash wordpress/scripts/test/playground-db-activation-smoke.sh.
  5. Observe 3 tests and 3 failures.

Acceptance criteria

  • Restore post-install activation for canonical PHPUnit dependency mounts.
  • Replay newly registered dependency callbacks exactly once.
  • Add real Playground integration coverage proving DB-touching activation and callback execution.
  • Make the Homeboy Extensions #2302 canary pass.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenAI GPT-5.6 Sol with OpenCode
  • Used for: Cross-repository lifecycle diagnosis, evidence analysis, and issue drafting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions