Skip to content

fix: preserve deferred WordPress hook lifecycle#2008

Open
chubes4 wants to merge 7 commits into
mainfrom
fix/2007-deferred-init-lifecycle
Open

fix: preserve deferred WordPress hook lifecycle#2008
chubes4 wants to merge 7 commits into
mainfrom
fix/2007-deferred-init-lifecycle

Conversation

@chubes4

@chubes4 chubes4 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • let wordpress.phpunit own WordPress bootstrap instead of preloading the runtime's single-site wp-load.php
  • defer external-MySQL multisite setup to the managed WordPress test installer, where network tables and constants are established together
  • replay plugin and dependency fallback lifecycle callbacks through an isolated WP_Hook, preserving callbacks registered at later priorities
  • retain replayed and dynamically added callbacks without rerunning callbacks WordPress already dispatched
  • add disposable external-MySQL integration coverage for real mysqli, JSON_VALID, is_multisite(), switch_to_blog()/restore, lifecycle hooks, and nested priority-0 to priority-15 init replay

Verification

Closes #2007.

Consumer context: Extra-Chill/data-machine-events#546.

@chubes4

chubes4 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

Consumer verification update from Extra-Chill/data-machine-events#546:\n\n- Added and pushed commit 42f4489, which captures init callbacks when the component is first loaded by the dependency-mount fallback.\n- The real Playground integration now covers multisite plus a priority-0 init callback that registers a priority-15 callback; it passes locally.\n- DME workflow run https://github.com/Extra-Chill/data-machine-events/actions/runs/30066183996 improved from 129 to 104 failures. Block, ability, vendor, REST lifecycle, and canonical venue mutation acceptance now pass.\n- Remaining owner-runtime failure: WordPressLifecycleTest::test_runtime_provides_multisite_blog_switching still sees is_multisite() === false in the external-MySQL GitHub Actions runtime, despite HOMEBOY_WORDPRESS_MULTISITE=1. The SQLite Playground integration on this branch sees multisite correctly, so the residual is specific to the external-MySQL runtime path/configuration handoff.\n\nDME remains blocked from final PR until that MySQL multisite path is faithful.

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 PHPUnit bootstrap drops init callbacks added during deferred init replay

1 participant