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

If Rector rules have bugs, the produced downgrade code may also have bugs. The tests must fail whenever this happens #544

Closed
leoloso opened this issue Mar 25, 2021 · 1 comment · Fixed by #596

Comments

@leoloso
Copy link
Collaborator

leoloso commented Mar 25, 2021

Downgrading code to PHP 7.1 with Rector is currently producing code with a few bugs:

We need to make sure that, after downgrading the code, no buggy code has been produced.

For that, in downgrade_php_tests.yml, run the Rector process a 2nd time, using --dry-run:

  • If buggy code was produced, Rector will very likely fail
  • If not all chained rules were executed, a new modification will take place, and using --dry-run will fail
@leoloso
Copy link
Collaborator Author

leoloso commented Mar 25, 2021

@TomasVotruba This issue may be relevant for you too, for when generating rector-prefixed.

I hope you'll agree with my proposed solution. If there's anything better, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant