Skip to content

Fix variadic trailing comma printer in format preserving printer - option #2#1126

Open
TomasVotruba wants to merge 2 commits intonikic:masterfrom
TomasVotruba:tv-trailing-variadic
Open

Fix variadic trailing comma printer in format preserving printer - option #2#1126
TomasVotruba wants to merge 2 commits intonikic:masterfrom
TomasVotruba:tv-trailing-variadic

Conversation

@TomasVotruba
Copy link
Contributor

@TomasVotruba TomasVotruba commented Oct 27, 2025

This is alternative option to #1125
that does not modify TokenStream, a value object that should be read-only IMO.

To run just this test:

vendor/bin/phpunit test/PhpParser/PrettyPrinterTest.php --filter "args_to"

@nikic Let us know whichever you prefer or if you see a better way to fix this bug 👍

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.

2 participants