Handling configurations that depend on PHP version #7919
julienfalque
started this conversation in
RFC
Replies: 2 comments
-
My suggestion would be (but probably requires review and adjustments of rules)
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I shared my opinion in the releated discussion #7312 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, when a fixer option only makes sense on a subset of supported PHP versions, we throw an exception in case the option is enabled on an incompatible version.
This requires the consumer (end user or ruleset) to make sure the provided configuration is compatible. However, in most cases, the fixer could accept the configuration and simply discard incompatible changes it would lead to.
As an example, with option
elements
of ruletrailing_comma_in_multiline
(ref), we could always allowparameters
and skip those on PHP 7.4. Same formatch
, which would likely not even require code changes as the token simply does not exist on PHP 7.4.1 vote ·
Beta Was this translation helpful? Give feedback.
All reactions