Seal the AbstractLiteral/ListLiteral hierarchy (@internal) (#96) - #101
Merged
MidnightDesign merged 1 commit intoJul 23, 2026
Merged
Conversation
Mark AbstractLiteral and ListLiteral @internal + @psalm-internal so the last published leaf of the literal hierarchy no longer pins the base open. This brings the literal nodes in line with their already-internal siblings Literal and StructLiteral, so all three AST base hierarchies (BinaryOperator, UnaryOperator, AbstractLiteral) are uniformly sealed, leaving Expression as the one intentional @api extension point. Structural break (removes ListLiteral and AbstractLiteral::value() from the public surface); scoped to the 0.3.0 breaking release. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gyo7ZrxfsGywwmBJgWmoSm
MidnightDesign
deleted the
96-seal-the-abstractliterallistliteral-hierarchy-internal
branch
July 23, 2026 14:40
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.
Closes #96.
What
Mark
AbstractLiteralandListLiteral@internal+@psalm-internal Eventjet\Ausdruck— they move as a pair.ListLiteralwas the last published leaf pinning the abstract base open, andAbstractLiteral::value()was an accidental public extension point.This brings the literal nodes in line with their already-
@internalsiblingsLiteralandStructLiteral. All three AST base hierarchies —BinaryOperator,UnaryOperator(#95), andAbstractLiteral— are now uniformly sealed, leavingExpressionas the one intentional@apiextension point.AbstractLiteralalso gains a short docblock (in theBinaryOperatorstyle) explaining whyvalue()exists and why no external subclass is warranted.BC impact
Structural break — removes
ListLiteralandAbstractLiteral::value()from the public surface. Scoped to the 0.3.0 breaking release; shares the same policy ruling as #95.Verification
cs-check,psalm,phpstan, andphpunit(1130 tests) all pass.infection-diffgenerated 0 mutations (comment-only lines), accepted by the--ignore-msi-with-no-mutationspolicy.🤖 Generated with Claude Code
https://claude.ai/code/session_01Gyo7ZrxfsGywwmBJgWmoSm