Skip to content

Printer: remove the separator after a removed first list item - #333

Merged
ondrejmirtes merged 1 commit into
phpstan:2.3.xfrom
ondrejmirtes:printer-remove-first-list-item
Oct 27, 2026
Merged

ondrejmirtes merged 1 commit into
phpstan:2.3.xfrom
ondrejmirtes:printer-remove-first-list-item

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

Removing the first type from A|B|C printed |B|C.
Removing the first type from (A & B) printed ( & B).

For lists other than PhpDocNode children, the printer now keeps the tokens before the removed item and skips the separator after it.

Removing the first type from A|B|C printed |B|C.
Removing the first type from (A & B) printed ( & B).

Amp-Thread-ID: https://ampcode.com/threads/T-01a17930-0285-73c5-a957-4325c77aa1b2
@ondrejmirtes
ondrejmirtes merged commit 2c122d2 into phpstan:2.3.x Oct 27, 2026
66 checks passed
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.

1 participant