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

EloquentWhereTypeHintClosureParameterRector refactor #290

Merged
merged 4 commits into from
Jan 11, 2025

Conversation

peterfox
Copy link
Collaborator

@peterfox peterfox commented Jan 9, 2025

Related to #287

Changes

  • modifies two rules where a downgrade was causing the rule to break.
  • adds additional tests.
  • refactor the tests to not define classes in the fixtures and use source objects instead.
  • sets up the build mechanism to retest code after a downgrade.

Why

It looks like the DowngradeMatchToSwitchRector rule has an issue there which ended up removing code required to check the method causing the downgraded EloquentWhereTypeHintClosureParameterRector to break.

@driftingly @GeniJaho, we should be careful to make sure contributors add skip fixtures to cover conditions that ensure the rules they build don't affect code they're not meant to.

@peterfox peterfox marked this pull request as ready for review January 11, 2025 21:48
@peterfox peterfox requested a review from GeniJaho January 11, 2025 21:48
@peterfox
Copy link
Collaborator Author

I've fixed the downgrade rule that caused the problems rectorphp/rector-downgrade-php#263

But it would still be good to get this merged in for the additional tests etc.

@GeniJaho GeniJaho merged commit 87ba7c3 into main Jan 11, 2025
5 checks passed
@GeniJaho GeniJaho deleted the fix/287-incorrect-method-handling branch January 11, 2025 21:54
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.

2 participants