13A. Report a registration that arrives after the load pass - #74
Open
nikolaystrikhar wants to merge 2 commits into
Open
13A. Report a registration that arrives after the load pass#74nikolaystrikhar wants to merge 2 commits into
nikolaystrikhar wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Boot\Scheduler names Absorber::class in executable code, and has to: a named static callback is what remove_filter() needs. What the rule is about is the registry -- no collaborator reaches it through the facade.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What:
Registry\Reader::buffer()reports a registration that arrives past the load pass, on_doing_it_wrong()and{prefix}/plugin_absorber/error;Boot\Schedulerexposesregistration_window_has_closed()and reads theplugins_loadedposition once for both windows.Usage: a host module registering from its own
plugins_loadedcallback at the default priority used to vanish without a symptom. Now:Why this way:
The measurement stays with the priorities. The registry asks;
Boot\Scheduleranswers, because the answer turns on this library's own priorities and how far its hook has got. A registry reading$GLOBALS['wp_filter']for itself would hold a second copy of a rule that moves whenever a priority here does.Reporting is the whole remedy.
boot()can fall back inline because the sequence had not run yet. Here it has. Requiring the file from a registration would be a load pass of one that skipped every gate and ran behind the conflict step, landing the bundled copy on a standalone nobody stood down.It speaks only inside the dispatch. After
plugins_loadeda host that has not booted yet is not late —wire()runs the sequence inline and reads the buffer — and nothing here can tell that host from one whose pass is long past. Where the answer is unknowable, the guard says nothing rather than warning about a sub-plugin that loaded.