Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TypeCombinatorTest: turn return into yield #4451

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

Draft
staabm wants to merge 1 commit into phpstan:2.1.x
base: 2.1.x
Choose a base branch
Loading
from staabm:yie
Draft

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Oct 18, 2025
edited
Loading

I used rector to transform the test. I think its way more readable to have a single yield per test-case instead of a huge return [[], [], []] in which its hard to see where test-data from one test starts and where the next one starts etc.

just did the transformation on a single test for now, to discuss the overall idea.

this PR did not transform the yield from [[], [], []] into yield, as this is not yet implemented in rector.

wdyt?

@staabm staabm marked this pull request as ready for review October 18, 2025 13:01
Copy link
Collaborator

This pull request has been marked as ready for review.

Copy link
Contributor Author

staabm commented Oct 19, 2025

please do not merge yet, as I need to tripple check the results first. I was just asking for the idea at first

@staabm staabm marked this pull request as draft October 19, 2025 06:00
Copy link
Member

I'm thinking:

  1. I don't want to merge this before we merge and test and release the new PHPUnit rule. I want to see what it does with the current test suite as it has existed for years.
  2. I want to eventually do this but with a custom rule here in phpstan-src that uses fixNode() to do this. I don't want to do it once with Rector and then get it wrong again, I want to continuously test it.
staabm reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /