-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Improve PHPDoc types support #4914
Conversation
42e5f42
to
e15c66f
Compare
e15c66f
to
19808ce
Compare
19808ce
to
564ffbd
Compare
564ffbd
to
5791c12
Compare
I've worked a bit more on this and made several improvements. Now this PR adds support for:
|
5791c12
to
cd1398c
Compare
cd1398c
to
2ce4537
Compare
I'm sorry @keradus to ping you, but Hope to see a release with this bugfix as soon as possible 😢 |
Yup, sorry |
088f73c
to
dd1181b
Compare
@julienfalque can we add tests from #5049 here? |
Didn't get a notification for this review being dismissed. What was the talk about?
Sure thing. Are you allowed to push on my branch? Otherwise I'll cherry-pick your commit. |
indeed, I don't see why the spacing would matter when extracting the type info |
Using whitespaces is not a widespread practice but it should not be complicated to add support for it. I'll try to do it shortly. |
👍 it will saves the trouble of figuring out all the possible priority issues with fixers that clean up the spacing |
a88d4d6
to
32a01d3
Compare
Test case added. Though whitespaces are not stripped from the result because the type is parsed as a whole. |
Is the "type" |
Not sure what you mean. The regex just extracts the type definition as-is, without changing anything to it. Those whitespaces have no special meaning, they are not part of a type, e.g. there is no Removing the whitespaces would prevent, e.g. a fixer to know the original syntax in order to change it. |
@kubawerlos @julienfalque RTM than? can someone run this code on the some other code bases like SF/Twig/Doctrine for example to see if all goes well? |
and one more request, can some look into https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5095/files to see if the issue there is no longer present in this PR? |
Can't we merge this and update the other one and we will all see? |
I prefer to resolve both PR's here as 5095 hasn't got any comments what so ever and I don't want it to sit there forever |
32a01d3
to
e867e88
Compare
@SpacePossum I tried applying changes from #5095 and all tests were green. I approved #5095, we can merge them separately IMO. |
e867e88
to
ebb24da
Compare
can you rebase, @julienfalque ? |
ebb24da
to
636b476
Compare
Done. |
a0d058e
to
fd4a770
Compare
Thank you @julienfalque. |
@julienfalque do you think this could be behind #5836? |
Related to #4913.