Skip to content

Conversation

@JakeQZ
Copy link
Collaborator

@JakeQZ JakeQZ commented Jan 20, 2025

Unfortunately, this has been broken for comments preceding a case within a switch since PHP CS Fixer version 3.9.1.

See

A configuration option stick_comment_to_next_continuous_control_statement was added, but this has not yet been extended to cover case within a switch.

So, for the time being, we cannot use this rule if we want to comment cases within a swtich.

Unfortunately, this has been broken for comments preceding a `case` within a
`switch` since PHP CS Fixer version 3.9.1.

See
- PHP-CS-Fixer/PHP-CS-Fixer#6572
- PHP-CS-Fixer/PHP-CS-Fixer#6490
- PHP-CS-Fixer/PHP-CS-Fixer#6490 (comment)
- PHP-CS-Fixer/PHP-CS-Fixer#7624

A configuration option `stick_comment_to_next_continuous_control_statement` was
added, but this has not yet been extended to cover `case` within a `switch`.

So, for the time being, we cannot use this rule if we want to comment `case`s
within a `swtich`.
@coveralls
Copy link

Coverage Status

coverage: 40.95%. remained the same
when pulling 72a10d2 on task/fixer/statement_indentation
into f67aa12 on main.

@oliverklee oliverklee merged commit bc511bb into main Jan 21, 2025
21 checks passed
@oliverklee oliverklee deleted the task/fixer/statement_indentation branch January 21, 2025 08:53
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.

4 participants