12C: Hand every pass the registry it reads, instead of a static call - #24
Open
nikolaystrikhar wants to merge 2 commits into
Open
12C: Hand every pass the registry it reads, instead of a static call#24nikolaystrikhar wants to merge 2 commits into
nikolaystrikhar wants to merge 2 commits into
Conversation
Conflict\Detector and Loader each reached Absorber::all() to walk the registry, so the facade sat both above its collaborators -- it boots them -- and below them, which no double could stand in for and no test could avoid standing up. The registration buffer moves to Registry_Reader, which is what reads it back out: Absorber::register() pushes into it, Absorber::all() delegates to it, and every pass takes one as a constructor argument. The buffer stays static because register() is a static call made before there is a container, but nothing except Absorber now names Absorber. A pass that holds its registrar no longer needs the container to read, so an unbuildable Registrar_Interface now fails while the pass is being built -- where an unbuildable Queue_Interface or Plugin_Checker_Interface has always failed. A duplicate slug still surfaces from the read, as Config_Exception, which is what the guarded read exists to catch.
Every new PHP file declares strict_types, so the rule arrives with the file rather than as a sweep over it afterwards. PR 21 covers everything that already existed on main.
nikolaystrikhar
force-pushed
the
12B-notices-queue-option
branch
from
August 13, 2026 11:01
6e55778 to
98a4426
Compare
nikolaystrikhar
force-pushed
the
12C-registry-reader
branch
from
August 13, 2026 11:01
2b5ea5c to
21db929
Compare
d4mation
approved these changes
Aug 13, 2026
d4mation
left a comment
There was a problem hiding this comment.
Took a bit to understand why Registry_Reader is named the way it is, but once I realized it was to read the Registrar object in the same buffered way as before it made more sense :)
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: adds
Registry_Reader, moves the registration buffer offAbsorber, givesConflict\DetectorandLoaderone as a constructor argument, and binds it inProvider.Usage:
Why this way:
The facade sat both above its collaborators and below them. It boots them, and they reached
Absorber::all()to walk the registry — an edge pointing back up that no double could stand in for and no test could avoid standing up.Absorber::register()now pushes into the reader andAbsorber::all()delegates to it; nothing butAbsorbernamesAbsorber.A pass is complete the moment it is built. Holding its registrar means it no longer needs the container to read, so an unbuildable
Registrar_Interfacefails while the pass is being built — where an unbuildableQueue_Interfacehas always failed.The buffer stays static, because
register()is a static call a host makes at plugin-file scope, before there is a container to resolve a registrar from. What changed is only which class pays for that.Over the source-file cap, at five.
Registry_Readeris the seam;Absorber,Detector,LoaderandProviderare the four callers it cannot land without.