Skip to content

10A. Make the registrar accessor agree with all() - #70

Open
nikolaystrikhar wants to merge 2 commits into
47-lifecycle-actionsfrom
53-registrar-agrees-with-all
Open

10A. Make the registrar accessor agree with all()#70
nikolaystrikhar wants to merge 2 commits into
47-lifecycle-actionsfrom
53-registrar-agrees-with-all

Conversation

@nikolaystrikhar

Copy link
Copy Markdown
Contributor

What: Absorber::registrar() drains the registration buffer through Registry\Reader before handing the registrar back, so it agrees with Absorber::all().

Usage: Absorber::registrar()->all() now answers with every registration made so far, from a host bootstrap at plugin-file scope, not only after plugins_loaded priority 5.

Why this way:

A public accessor that disagrees with another is worse than no accessor. Registration is buffered until something reads it, so the registrar was empty for the whole window a host actually asks in — while Registrar_Interface::all() promises every registration, in order, and Absorber::all() delivered it. Documenting the drift would have left two right answers to one question.

The drain runs after the binding is checked, not before. Registry\Reader takes a registrar as a constructor argument, so a registrar bound to the wrong class is an unbuildable reader too: draining first would send the host after a collaborator it never bound instead of naming the binding it got wrong.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Enterprise

Run ID: 67c4d47a-a03c-45e2-8e43-6076f6f0ea2c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Eight of its members are public static -- they are the API a host calls. What no
subclass can reach is the booted flag and the collaborator helper, and what makes an
override pointless is that every internal call is self::.
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.

1 participant