Skip to content

Seal the AbstractLiteral/ListLiteral hierarchy (@internal) (#96) - #101

Merged
MidnightDesign merged 1 commit into
masterfrom
96-seal-the-abstractliterallistliteral-hierarchy-internal
Jul 23, 2026
Merged

Seal the AbstractLiteral/ListLiteral hierarchy (@internal) (#96)#101
MidnightDesign merged 1 commit into
masterfrom
96-seal-the-abstractliterallistliteral-hierarchy-internal

Conversation

@MidnightDesign

Copy link
Copy Markdown
Contributor

Closes #96.

What

Mark AbstractLiteral and ListLiteral @internal + @psalm-internal Eventjet\Ausdruck — they move as a pair. ListLiteral was the last published leaf pinning the abstract base open, and AbstractLiteral::value() was an accidental public extension point.

This brings the literal nodes in line with their already-@internal siblings Literal and StructLiteral. All three AST base hierarchies — BinaryOperator, UnaryOperator (#95), and AbstractLiteral — are now uniformly sealed, leaving Expression as the one intentional @api extension point.

AbstractLiteral also gains a short docblock (in the BinaryOperator style) explaining why value() exists and why no external subclass is warranted.

BC impact

Structural break — removes ListLiteral and AbstractLiteral::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, and phpunit (1130 tests) all pass. infection-diff generated 0 mutations (comment-only lines), accepted by the --ignore-msi-with-no-mutations policy.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gyo7ZrxfsGywwmBJgWmoSm

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 MidnightDesign linked an issue Jul 23, 2026 that may be closed by this pull request
@MidnightDesign
MidnightDesign merged commit 30a6ae7 into master Jul 23, 2026
25 checks passed
@MidnightDesign
MidnightDesign deleted the 96-seal-the-abstractliterallistliteral-hierarchy-internal branch July 23, 2026 14:40
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.

Seal the AbstractLiteral/ListLiteral hierarchy (@internal)

1 participant