Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Oct 18, 2025

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
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@staabm
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
@ondrejmirtes
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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants