Skip to content

Blink parity: split shared-line commas in multiline arrays - #133

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-blink-parity-array-split
Oct 4, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-blink-parity-array-split

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

One array-reflow parity fix on mautic/mautic. Measured drop: 40 to 37 differing files of 4527 (0.82%).

A multiline associative array could still carry a top-level comma sharing its line with the next item:

'label_attr' => [
    'class' => 'control-label',
], 'attr' => [

ArrayListItemNewline skipped already-multiline arrays entirely, so such a comma was never broken. It now breaks each top-level comma that still shares its line (matching Symplify's ArrayItemNewliner), leaving array_indentation to align the result. Comments and { after a comma are left alone, and a comma already followed by a newline is untouched.

Unit test covers the split; full blink suite, go vet and golangci-lint are green.

A multiline associative array could still carry a top-level comma that
shared its line with the next item ("], 'attr' => ["). ArrayListItemNewline
skipped multiline arrays entirely; now it breaks each such comma (Symplify
ArrayItemNewliner behavior), leaving array_indentation to align them.
@TomasVotruba
TomasVotruba merged commit e9abfc2 into main Oct 4, 2026
18 checks passed
@TomasVotruba
TomasVotruba deleted the tv-blink-parity-array-split branch October 4, 2026 20:06
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