Repository navigation
refactor(Conventions): open final classes and private members - #2429
Merged
Merged
Conversation
Drop `final` from the seven classes that had it, and make every `private` member in `src` protected, except `Shortcuts::ITEMS_KEEP_PROPERTIES`. Add the docblock shape to `docs/dev/writing-docs.md`, and the rules on `final` and on protected signatures to `AGENTS.md`.
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.
Overview
AGENTS.mdasks forprotectedoverprivate, but a number of members insrcare still private, and seven classes arefinal. Both decide in advance that nobody will need to extend them, which leaves copying the class as the only way out for someone who does.Opening them up is only workable if protected members are not treated as a frozen API, so that is written down too, together with the docblock shape the recent clean-ups follow.
No output changes.
Changes
finalremoved fromUndefined,ComponentKey,JsonPointer,SourceLocation,SecurityRequirement,ServerVariableEnumandSchema\AdditionalPropertiesprivatemembers insrcmadeprotectedAGENTS.md: nofinal, and protected signatures may changedocs/dev/writing-docs.md: a Docblocks section on summary, description and the single-line form