New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: introduce PhpdocListTypeFixer
#7796
feat: introduce PhpdocListTypeFixer
#7796
Conversation
399354c
to
d4d20fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
This change is a touch annoying.
https://phpstan.org/r/0f491ccd-f33a-448f-8824-69f198b24477 Converting If you want to have an opinionated fixer that disallows |
Has anyone, anywhere claimed that they are the same? Where have you been when rule
Have you ever considered that there are people in the world that can disagree with this statement? To name some - that would be @keradus (he explained it very well here) and myself.
The most important, and quite concerning question: is anyone forcing you to use this rule? |
FWIW I do think that forcing a legitimate But in the end you are the ones maintaining it so ¯_(ツ)_/¯ |
Um, clearly I don't have to consider it, because this PR shows that someone disagrees with me. Converting
I'll ignore this straw-man argument. Like I said, if you want to have an opinionated fixer that disallows the short form |
I am not a fan of this rule, but honestly I don't understand the reception it gets. It is a rule marked explicitly as risky, not included in any rule set, meant to be used as an opt-in when someone needs to standardise such a particular thing in the project. It may or may not be used, just like many other rules 🤷♂️😅. |
That's exactly my argument - there is a better standardisation that can be made: |
Can you point me to a place where PHPStan and Psalm state that?
Are you an eternal authority, to tell people what they "should" do? Because this is how it sounds. The issue was opened over 4 years ago and no one proposed anything, and then, when I did, the hell broke loose. I understand that you want a different preference, and I have nothing against it (nothing really stops you from raising PR with a configuration option to this rule). Can't you understand that other people have different preferences, and those are not wrong because they are different from your preferences? |
I edited that part of my message to remove
Not sure what you are trying to say, sorry.
👍
I can. I don't know why you keep asking me this. Thanks. |
Not when your goal is enforcing |
that's fair, thanks |
I also know that they are NOT equivalent, I wrote that, like 5 times this week, in issues around here 😉. I never claimed they were the same.
Because you wrote:
This sends a message that the only current solution is the one suggested. If you change "should" to "could" that would be a different story. |
@Wirone I'd rather see it as an option in this fixer (probably by deprecating this one and having a new name for it). |
@kubawerlos I don't think it's a good idea, because that kind of change is not risky and it would be better to use it in regular flow. |
Yeah, right, I forgot this one is risky. |
for safe convention we have #7781 , that's remain the "same same type" (and non-risky). We all know the rule in this PR is risky as it changes meaning of code. That's the definition of risky fixer and we explicitly claimed so in it's description. It's not supposed to be blindly use by anyone. |
Extracted, as per #7781 (comment)