Skip to content
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: phpDoc to property/return/param Fixer - allow fixing union types on PHP >= 8 #6359

Merged

Conversation

MortalFlesh
Copy link
Contributor

@MortalFlesh MortalFlesh commented Apr 8, 2022

Hello,

while I was doing mixed type PR (#6356) I noticed, that union-types are not handled by the phpdocs fixers. So I decided to make it possible.

It was quite harder, than I originally though (as usually.. 🤔 ) but in the end, it works good - at least I hope so :)

There are still a few points, which makes this a more like the draft more than a PR, since I needed to skip some assertions in the AssertTokensTrait. I would fix it too, but for now, I don't understand the tokens test and I didn't have time to dig in it. I might have some time next week, but I'd appreciate some help with that. Maintainer's note: there was problem with comparing Tokens before/after applying fix, it was fixed.

Also I updated the TypeExpression class to handle nullable typed by ? prefix. It is a separate commit and I could send it as a separate PR if needed. Yet I'm not sure if it is needed, since it does not have an impact for anything else. (At least according to tests.) Maintainer's note: it was removed during rebase, because the fix was already in master.

And this PR contains the commit from a mixed PR, so it needs to be rebased later to contain just the union-types. Maintainer's note: already merged, and this one is rebased on top of that.

@MortalFlesh MortalFlesh force-pushed the feature/fix-union-types-in-phpdocs branch 2 times, most recently from 99a104d to 9c1854d Compare April 8, 2022 14:31
@coveralls
Copy link

coveralls commented Apr 8, 2022

Coverage Status

Coverage decreased (-0.2%) to 92.663% when pulling c2f5d68 on MortalFlesh:feature/fix-union-types-in-phpdocs into 17e5591 on FriendsOfPHP:master.

@MortalFlesh MortalFlesh force-pushed the feature/fix-union-types-in-phpdocs branch from 9c1854d to c2f5d68 Compare August 19, 2022 11:56
@MortalFlesh MortalFlesh changed the title PhpdocTo Property/Return/Param Fixer - allow fixing union types on PHP >= 8 feature: PhpdocTo Property/Return/Param Fixer - allow fixing union types on PHP >= 8 Aug 19, 2022
@github-actions

This comment was marked as outdated.

@Wirone
Copy link
Member

Wirone commented Jun 4, 2023

@MortalFlesh is it possible to rebase this PR, so we can check current pipeline result and continue the review process?

@github-actions github-actions bot added status/to verify issue needs to be confirmed or analysed to continue and removed status/stale labels Jun 5, 2023
@Wirone Wirone added status/rebase required PR is outdated and required synchronisation with main branch and removed status/to verify issue needs to be confirmed or analysed to continue labels Jun 12, 2023
@github-actions

This comment was marked as outdated.

@github-actions github-actions bot added status/to verify issue needs to be confirmed or analysed to continue and removed status/stale labels Oct 20, 2023
@Wirone Wirone removed the status/to verify issue needs to be confirmed or analysed to continue label Oct 31, 2023
@Wirone Wirone force-pushed the feature/fix-union-types-in-phpdocs branch from c2f5d68 to b430241 Compare October 31, 2023 10:34
@Wirone Wirone changed the title feature: PhpdocTo Property/Return/Param Fixer - allow fixing union types on PHP >= 8 feat: phpDoc to property/return/param Fixer - allow fixing union types on PHP >= 8 Oct 31, 2023
@Wirone Wirone force-pushed the feature/fix-union-types-in-phpdocs branch from b430241 to 9c96b1f Compare October 31, 2023 10:35
@Wirone Wirone removed the status/rebase required PR is outdated and required synchronisation with main branch label Oct 31, 2023
@coveralls
Copy link

coveralls commented Oct 31, 2023

Coverage Status

coverage: 94.52% (-0.08%) from 94.604%
when pulling 5b522f8 on MortalFlesh:feature/fix-union-types-in-phpdocs
into 204e6f4 on PHP-CS-Fixer:master.

@Wirone Wirone force-pushed the feature/fix-union-types-in-phpdocs branch 4 times, most recently from 5162b5c to dcdc5c2 Compare November 1, 2023 22:32
@Wirone Wirone force-pushed the feature/fix-union-types-in-phpdocs branch from bb6d318 to d3d1675 Compare November 2, 2023 22:50
@Wirone Wirone force-pushed the feature/fix-union-types-in-phpdocs branch from d3d1675 to 5b522f8 Compare November 4, 2023 23:23
@Wirone Wirone enabled auto-merge (squash) November 4, 2023 23:27
@Wirone Wirone merged commit 3c3ddcb into PHP-CS-Fixer:master Nov 4, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants