The `withConsecutive()` method [was deprecated in PHPUnit 9](https://github.com/sebastianbergmann/phpunit/issues/4255#issuecomment-636422439) and removed in PHPUnit 10. It sparked many [questions](https://stackoverflow.com/questions/75389000/replace-phpunit-method-withconsecutive-abandoned-in-phpunit-10), [on StackOverflow](https://stackoverflow.com/questions/77865216/phpunit-withconsecutive-is-gone-what-is-the-recommended-approach), in [various projets](https://www.drupal.org/project/drupal/issues/3306554) and [GitHub](https://github.com/search?q=repo%3Asebastianbergmann%2Fphpunit+withConsecutive&type=issues).
It was not a very popular BC break. There is no 1:1 replacement. It can be combined with `willReturn*()` methods, which can make it even more tricky to merge with.
PHPUnit upgrades take 95 % of the time to upgrade this single method and 5 % for everything else.
In recent months, we've done a couple of project upgrades with Rector and learned a lot.
Today, I want to share some knowledge with you and explain why it's a change for better code.