19: Give the registry a folder of its own - #33
Open
nikolaystrikhar wants to merge 1 commit into
Open
Conversation
The two classes that hold and read the registered sub-plugins sat in the root of src/ beside the facades, and the interface one of them implements sat in src/Contracts/ with everything else that happened not to have a folder. They are now src/Registry/: Registrar, Reader and Contracts/Registrar_Interface, which is the arrangement Conflict/ and Notices/ already have -- the folder carries the subject, the class carries the job. Only Registry_Reader is renamed, to Registry\Reader, because the folder now says the half its old name was spelling out. Registrar keeps its name and so does Registrar_Interface: the alternative that reads better in isolation, Registry\Store, collides with Notices\Store in the two files that name both, and renaming a host seam is free only until 1.0.0 tags.
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: moves
Registrar,Registry_ReaderandContracts\Registrar_Interfaceintosrc/Registry/, renaming the reader toRegistry\Reader. No behaviour changes, no hook or priority moves.Usage:
Why this way:
The folder carries the subject, the class carries the job. The same arrangement
Conflict\andNotices\already have — two classes on one subject, with the interface in that folder'sContracts\rather than in the top-level catch-all.Only the reader is renamed.
Registry\Reader, because the folder now spells the half its old name was carrying.Registrarkeeps its name:Registry\Storereads better in isolation but collides withNotices\Storein the two files that name both, and renaming a host seam is free only until 1.0.0 tags.