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 mixed on PHP >= 8 #6356

Merged
merged 2 commits into from Oct 31, 2023

Conversation

MortalFlesh
Copy link
Contributor

Hello,

I'm trying to use PhpdocTo Property/Return/Param Fixers for fixing a mixed type from phpdocs on PHP >= 8.0 - which allows mixed as a declared scalar type.

It seems to me, it should work. But it is actually skipped before even trying to check if the type is allowed for the version.

I removed the mixed from a skipped types and it is checked against a version specific types later, so it works fine.
I also unified test cases for all 3 fixers, so it lowers a brain damage for managing the tests.

PS:
I created the PR from master and marked it as a feature not as a bugfix, since I feel it as an improvement in the fixing - not fixing a bug, but I can change it if it should be a bugfix.

@coveralls
Copy link

coveralls commented Apr 6, 2022

Coverage Status

Coverage decreased (-0.0008%) to 92.836% when pulling 67c1ff1 on MortalFlesh:feature/fix-mixed-in-phpdocs into 17e5591 on FriendsOfPHP:master.

Copy link
Member

@julienfalque julienfalque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description of those fixers are outdated, they say:

  • they only fix "non-mixed types"
  • they require an old PHP version

Can you update them please?

@keradus
Copy link
Member

keradus commented Aug 17, 2022

@MortalFlesh , would you mind to address julienfalque's comments, so we can merge this great PR?

@MortalFlesh
Copy link
Contributor Author

Hello @keradus I will try to do it today, I'm kinda busy these days :)

@MortalFlesh MortalFlesh changed the title PhpdocTo Property/Return/Param Fixer - allow fixing mixed on PHP >= 8 feature - PhpdocTo Property/Return/Param Fixer - allow fixing mixed on PHP >= 8 Aug 19, 2022
@MortalFlesh MortalFlesh changed the title feature - PhpdocTo Property/Return/Param Fixer - allow fixing mixed on PHP >= 8 feature: PhpdocTo Property/Return/Param Fixer - allow fixing mixed on PHP >= 8 Aug 19, 2022
@MortalFlesh MortalFlesh force-pushed the feature/fix-mixed-in-phpdocs branch 2 times, most recently from ebab931 to 67c1ff1 Compare August 19, 2022 11:43
@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 force-pushed the feature/fix-mixed-in-phpdocs branch from 67c1ff1 to 00e29bb Compare October 31, 2023 10:55
@Wirone Wirone changed the title feature: PhpdocTo Property/Return/Param Fixer - allow fixing mixed on PHP >= 8 feat: phpDoc to property/return/param Fixer - allow fixing mixed on PHP >= 8 Oct 31, 2023
@Wirone Wirone removed status/to verify issue needs to be confirmed or analysed to continue status/rebase required PR is outdated and required synchronisation with main branch labels Oct 31, 2023
@coveralls
Copy link

coveralls commented Oct 31, 2023

Coverage Status

coverage: 94.604%. remained the same when pulling 4305639 on MortalFlesh:feature/fix-mixed-in-phpdocs into 5f102b4 on PHP-CS-Fixer:master.

Copy link
Member

@Wirone Wirone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to clean this up a little 😉.

@Wirone Wirone force-pushed the feature/fix-mixed-in-phpdocs branch from 00e29bb to 4305639 Compare October 31, 2023 13:20
@Wirone Wirone merged commit 877bfb6 into PHP-CS-Fixer:master Oct 31, 2023
15 checks passed
@Wirone
Copy link
Member

Wirone commented Oct 31, 2023

Thank you @MortalFlesh 🍻

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

6 participants