[Example Config] Use class reference instead of self:: on code example config to ease copy paste config #6037
Merged
samsonasik merged 2 commits intomainfrom Jun 26, 2024
Merged
[Example Config] Use class reference instead of self:: on code example config to ease copy paste config #6037samsonasik merged 2 commits intomainfrom
samsonasik merged 2 commits intomainfrom
Conversation
Member
Author
|
All checks have passed 🎉 @TomasVotruba I am merging it ;) |
Member
|
We'll have to fix this in the tool, not enforce it here:) |
Member
Author
|
I don't understand, what tool? There is no example in generarted documentation now, in the past, we have example config in generated documentation, and that feature removed on symplify doc generator, so currently, user only can see example by read the config in the rules, so copy paste from there is needed to symplify DX |
Member
Author
|
Reverting at #6038 btw, but I need explanation for this, as this was used for DX |
Member
|
Thanks 👍 I think we should solve this in the documentation, as other projects do. I rarely copy-paste any code from other projects internals. It's either documented or never used. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ref #6035 (review) as they are public constant to copy on configure rector, something like:
$rectorConfig ->ruleWithConfiguration(BooleanInTernaryOperatorRuleFixerRector::class, [ - self::TREAT_AS_NON_EMPTY => false, + BooleanInTernaryOperatorRuleFixerRector::TREAT_AS_NON_EMPTY => false, ]);selfjust pointed to invalid target class on rector config.