Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Improve ExtractorInterface phpdoc#40604
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Nyholm commentedMar 28, 2021
Thank you for these PRs. We are happy to improve minor things like this, but only if they are broken. What I can see, there is no bug this PR is fixing. |
VincentLanglet commentedMar 28, 2021
Hi@Nyholm . I'm not sure to understand, do you want that I do this PR on another branch or does these PR are not welcomed ? User of static analysis like phpstan/psalm can encounter an issue. If this kind of situation, psalm is returning an error For this reason, some stubs are created to override/be more precise about the phpdoc of symfony (seehttps://github.com/psalm/psalm-plugin-symfony/tree/master/src/Stubs). Instead of creating a new stub in the psalm plugin symfony, I thought the phpdoc improvement would be accepted by symfony. |
Nyholm commentedMar 28, 2021
Im saying that we are happy to fix bugs. This is not a bug. This is a change to please a third party tool. Note that we do run psalm on all PRs to make sure we don't introduce more of these issues. We are also fixing issues found by psalm (see#40603). But again, it has to be real issues that affects the code. Changing from |
Nyholm commentedMar 28, 2021
I looked at the psalm errors for 4.4 and I did find a few that actually matters.#40610 |
VincentLanglet commentedMar 28, 2021
Sure, it's not abug. But still an improvement. I still don't get why you're talking like these PR would be forbidden. For the method, You could believe that an array of So changing the param typehint from |
derrabus left a comment
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.
The change is correct and it improves the documentation of the interface. It would be in favor of merging this PR.
Nyholm commentedMar 29, 2021
#39170 added missing documentation. This is changing a valid type to a slightly better valid type. I undertand that this may seam arbitrary. But I stand to the fact that this PR is not helping anybody. I don't want to allow this kind of PRs because that opens the door for more PRs like it. Instead I want to focus the effort in making changes that benefit the users in a more obvious way. I vote 👎 for this PR. Since you clearly disagree, I'll leave this open for a second opinion. |
derrabus commentedMar 29, 2021
So, it's an improvement that helps@VincentLanglet at least and does not hurt anyone. What is your alternative? Patch this on 5.x because it's not a bugfix? Leave an imprecise type declaration from 2015 as it is for eternity? While introducing a stricter static code analysis to my Symfony projects, I keep finding issues like this one more and more myself. I understand that you don't see value in such changes, but they actually do help. |
chalasr commentedMar 29, 2021
👍 as a minor improvement on 5.x (no bug here) |
VincentLanglet commentedMar 29, 2021
@derrabus Should I change the target branch ? |
Nyholm commentedMar 31, 2021
Yes please. It seams like there are a few more people that disagree with me. I'll be happy yo merge this in 5.x as a minor improvement. |
derrabus commentedMar 31, 2021
Thank you! |
Nyholm commentedMar 31, 2021
I suggest adding the change form#40601 in this PR too. |
VincentLanglet commentedMar 31, 2021
Done |
Nyholm commentedApr 1, 2021
Could you please rebase your PR on 5.x so the tests are green? It looks like you forked it a long long time ago. |
acde223 to9504bc3CompareVincentLanglet commentedApr 1, 2021
I just pulled 5.x and rebased, but tests are still failing... |
Nyholm commentedApr 1, 2021
Cool. Thank you. This test failure is fine. It is not related to this PR. (Before we were testing on PHP 7.1 which was dropped a long time ago) |
Uh oh!
There was an error while loading.Please reload this page.
I think this phpdoc can be improved