You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In php-cs-fixer v3.52.1, multiline_whitespace_before_semicolons behaves inconsistently, by sometimes moving the ; from a new line to the previous one in a multiline condition, if new_line_for_chained_calls is specified.
I previously submitted #7897 to add a new strategy that fixes the issue, but given the inconsistency it's not exactly clear to me what is the intended behavior of the new_line_for_chained_calls strategy.
The behavior I need is the one specified in my new_line_for_chained_calls_ignore_rest strategy in the PR, i.e. in multiline calls the comma is moved to a new line, and all other multline expressions are ignored, leaving the comma in its place.
Another acceptable behavior is to move the comma to a new line in all multiline expressions (currently done by another fixing tool in my pipeline).
Bug report
In php-cs-fixer v3.52.1,
multiline_whitespace_before_semicolons
behaves inconsistently, by sometimes moving the;
from a new line to the previous one in a multiline condition, ifnew_line_for_chained_calls
is specified.I previously submitted #7897 to add a new strategy that fixes the issue, but given the inconsistency it's not exactly clear to me what is the intended behavior of the
new_line_for_chained_calls
strategy.The behavior I need is the one specified in my
new_line_for_chained_calls_ignore_rest
strategy in the PR, i.e. in multiline calls the comma is moved to a new line, and all other multline expressions are ignored, leaving the comma in its place.Another acceptable behavior is to move the comma to a new line in all multiline expressions (currently done by another fixing tool in my pipeline).
Code snippet that reproduces the problem
Result:
The text was updated successfully, but these errors were encountered: