Skip to content

Deprecate BinarySwitchToIfElseRector as opinionated to allow more suitable match() refactoring#5064

Merged
TomasVotruba merged 1 commit intomainfrom
tv-if-else-switch
Sep 22, 2023
Merged

Deprecate BinarySwitchToIfElseRector as opinionated to allow more suitable match() refactoring#5064
TomasVotruba merged 1 commit intomainfrom
tv-if-else-switch

Conversation

@TomasVotruba
Copy link
Copy Markdown
Member

@TomasVotruba TomasVotruba commented Sep 22, 2023

This rule had a meaning back in PHP 7.4, but now it removes option to manual refactoring to match fomr PHP 8.0, that is more often sutiable. Even if it requires manual workaround with predefined value above the switch.

Let's give the option back, as match is much easier to read and work with 🙂

Ref #5057 (comment)

@TomasVotruba TomasVotruba merged commit 85a407a into main Sep 22, 2023
@TomasVotruba TomasVotruba deleted the tv-if-else-switch branch September 22, 2023 09:52
@samsonasik
Copy link
Copy Markdown
Member

/cc @jlherren FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants