Repository navigation
Space compound-assignment operators in blink binary_operator_spaces - #242
Merged
Merged
Conversation
TomasVotruba
force-pushed
the
blink-binary-operator-compound-assign
branch
from
October 30, 2026 16:40
95318c7 to
931e74e
Compare
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.
The laravel/symfony parity ruleset configures
BinaryOperatorSpaceswithdefault: single_spaceandoperators: { "=>": single_space, "=": single_space }. PHP-CS-Fixer applies thedefaultmode to ALL binary operators, including compound-assignment operators (.=,+=, etc.), unless an explicit per-operator override says otherwise.blink did not: in
modeAt, compound-assignment operators were treated as extra targets that only got spaced when explicitly listed in the config'soperatorsmap. Since the ruleset only lists=>and=, blink left.=and the other compound-assigns untouched, diverging from PHP ECS.Example of the divergence (blink left, PHP ECS right):
$url .='c';->$url .= 'c';The fix makes compound-assignment operators follow the
defaultmode like=, since they are always binary (never unary/reference/splat) and therefore safe to space without an explicit override. Behavior for+ - * & | / % ^ << >> **is unchanged.