From 1c9837f8dff57ef4bea95115b44943feabf977f9 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Sat, 14 Jan 2023 13:27:06 +0100 Subject: [PATCH] Closes #5063 --- ChangeLog-9.6.md | 1 + src/Framework/MockObject/Builder/InvocationMocker.php | 2 ++ src/Framework/MockObject/Rule/ConsecutiveParameters.php | 2 ++ 3 files changed, 5 insertions(+) diff --git a/ChangeLog-9.6.md b/ChangeLog-9.6.md index 1dfb1d129cd..06a35f22178 100644 --- a/ChangeLog-9.6.md +++ b/ChangeLog-9.6.md @@ -7,6 +7,7 @@ All notable changes of the PHPUnit 9.6 release series are documented in this fil ### Changed * [#5062](https://github.com/sebastianbergmann/phpunit/issues/5062): Deprecate `expectDeprecation()`, `expectDeprecationMessage()`, `expectDeprecationMessageMatches()`, `expectError()`, `expectErrorMessage()`, `expectErrorMessageMatches()`, `expectNotice()`, `expectNoticeMessage()`, `expectNoticeMessageMatches()`, `expectWarning()`, `expectWarningMessage()`, and `expectWarningMessageMatches()` +* [#5063](https://github.com/sebastianbergmann/phpunit/issues/5063): Deprecate `withConsecutive()` * [#5064](https://github.com/sebastianbergmann/phpunit/issues/5064): Deprecate `PHPUnit\Framework\TestCase::getMockClass()` * [#5132](https://github.com/sebastianbergmann/phpunit/issues/5132): Deprecate `Test` suffix for abstract test case classes diff --git a/src/Framework/MockObject/Builder/InvocationMocker.php b/src/Framework/MockObject/Builder/InvocationMocker.php index 89b1e31ab10..bc3c9236f00 100644 --- a/src/Framework/MockObject/Builder/InvocationMocker.php +++ b/src/Framework/MockObject/Builder/InvocationMocker.php @@ -194,6 +194,8 @@ public function with(...$arguments): self * @throws MethodParametersAlreadyConfiguredException * * @return $this + * + * @deprecated */ public function withConsecutive(...$arguments): self { diff --git a/src/Framework/MockObject/Rule/ConsecutiveParameters.php b/src/Framework/MockObject/Rule/ConsecutiveParameters.php index 6025c0a1604..2188ea0ffc0 100644 --- a/src/Framework/MockObject/Rule/ConsecutiveParameters.php +++ b/src/Framework/MockObject/Rule/ConsecutiveParameters.php @@ -21,6 +21,8 @@ /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated */ final class ConsecutiveParameters implements ParametersRule {