Repository navigation
Blink parity: YodaStyle + MAS dynamic-call reflow - #129
Merged
Merged
Conversation
Stop the right comparison operand at a ?> close tag so blink no longer pulls it into the operand (was producing invalid $$a?> == 1 under the non-yoda config). Leave a yoda-direction swap untouched when the primary carries a unary prefix (!!$a) rather than stranding it. Gate the ported php-cs-fixer YodaStyle cases behind a documented known-failures allowlist so the WIP port stays green; a listed case that starts passing fails the test so the list is pruned.
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.
Pushes blink parity on mautic/mautic further by porting the php-cs-fixer YodaStyle test suite and fixing the divergences it surfaced, plus a MethodArgumentSpace fix.
YodaStyle
?>close tag - blink was pulling the tag into the operand and emitting invalid$$a?> == 1under the non-yoda config mautic uses."...{$x}..."is no longer treated as a yoda literal..as higher precedence than comparison, so a concatenated operand is left alone.!!$a) instead of stranding the prefix.The ported cases blink does not yet match (always_move_variable, the yoda direction on complex primaries, nested comparisons inside a subscript or dynamic member) are gated behind a documented known-failures allowlist; all remaining divergences are valid PHP. A listed case that starts passing fails the test so the list gets pruned.
MethodArgumentSpace
->{$op}(...)(previous token}).Measured on mautic/mautic (app + plugins, all prepared sets): 68 of 4527 files differ (1.50%), under the 1.6% ratchet gate. No regression from the YodaStyle operand fixes.