[Defluent] Remove often-breaking set #1062
Merged
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.
We should focus our energy from "bleeding rules" to improve DX in general. Make 450 rules more accesible to everyone by better experience, rather then invest same amount of energy to 2-3 magical rules that very few developers can use without being affraid to break their code base.
This is similar to removal of
MoveVariableDeclarationNearReferenceRector
for high complexity and very unrealiable behavior in the practise #587 and NullsafeOperatorRector #900Fluent rules have many possible resolutoins and goals. While it's a set that is definitelly useful, it can create undesired code (rectorphp/rector#4890). It's maintenance cost shown as expensive.
Much better approach is to use PHPStan rules like
NoChainMethodCallRule
https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#nochainmethodcallrule to warn about these places and let you decide how to implement it.Anyone is welcomed to extract this ruleset to own maintained package 👍