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

Deprecate withConsecutive() #5063

Closed
sebastianbergmann opened this issue Sep 25, 2022 · 3 comments
Closed

Deprecate withConsecutive() #5063

sebastianbergmann opened this issue Sep 25, 2022 · 3 comments
Assignees
Labels
feature/test-doubles Test Stubs and Mock Objects type/deprecation Something will be/is deprecated
Milestone

Comments

@sebastianbergmann
Copy link
Owner

withConsecutive() has been removed in PHPUnit 10.

@sebastianbergmann sebastianbergmann added feature/test-doubles Test Stubs and Mock Objects type/deprecation Something will be/is deprecated labels Sep 25, 2022
@sebastianbergmann sebastianbergmann added this to the PHPUnit 9.6 milestone Sep 25, 2022
@sebastianbergmann sebastianbergmann self-assigned this Sep 25, 2022
sebastianbergmann added a commit that referenced this issue Jan 14, 2023
lcobucci added a commit to lcobucci/BackwardCompatibilityCheck that referenced this issue Mar 2, 2023
More info: sebastianbergmann/phpunit#5063

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
lcobucci added a commit to lcobucci/BackwardCompatibilityCheck that referenced this issue Mar 2, 2023
More info: sebastianbergmann/phpunit#5063

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
@oleg-andreyev
Copy link

@TomasVotruba
Copy link

There are around ~10 variations of how PHPUnit withConsecutive() can be upgraded. If there is a reference, followed by willReturn*() or by willReturnOnConsecutive() and more.

Instead of creating answer that fits only one specific quesition, I've put down an article that explains, how to upgrade all kind of combinations.

See:
https://tomasvotruba.com/blog/how-to-upgrade-deprecated-phpunit-with-consecutive

Hopefully you'll find it useful.

It includes PHP 7.* ready code (no match), that can be used in PHPUnit 9 (that requires 7.3+)

@PavelLoparev
Copy link

phpunit degrades fast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/test-doubles Test Stubs and Mock Objects type/deprecation Something will be/is deprecated
Projects
None yet
Development

No branches or pull requests

4 participants