From 8e0287ca7a2fd81e77482eefce4fc777e63b68a1 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Wed, 12 Apr 2023 10:22:17 +0200 Subject: [PATCH] Soft-deprecate addMethods() for #5320 --- ChangeLog-10.1.md | 1 + src/Framework/MockObject/MockBuilder.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog-10.1.md b/ChangeLog-10.1.md index 37eb1b9dee1..c29c164578f 100644 --- a/ChangeLog-10.1.md +++ b/ChangeLog-10.1.md @@ -35,6 +35,7 @@ All notable changes of the PHPUnit 10.1 release series are documented in this fi * [#5307](https://github.com/sebastianbergmann/phpunit/issues/5307): Deprecate `MockBuilder::enableProxyingToOriginalMethods()`, `MockBuilder::disableProxyingToOriginalMethods()`, and `MockBuilder::setProxyTarget()` (these methods only have a `@deprecated` annotation for now; using these methods will trigger a deprecation warning in PHPUnit 11; these methods will be removed in PHPUnit 12) * [#5308](https://github.com/sebastianbergmann/phpunit/issues/5308): Deprecate `MockBuilder::allowMockingUnknownTypes()` and `MockBuilder::disallowMockingUnknownTypes()` (these methods only have a `@deprecated` annotation for now; using these methods will trigger a deprecation warning in PHPUnit 11; these methods will be removed in PHPUnit 12) * [#5315](https://github.com/sebastianbergmann/phpunit/issues/5315): Deprecate `MockBuilder::enableArgumentCloning()` and `MockBuilder::disableArgumentCloning()` (these methods only have a `@deprecated` annotation for now; using these methods will trigger a deprecation warning in PHPUnit 11; these methods will be removed in PHPUnit 12) +* [#5320](https://github.com/sebastianbergmann/phpunit/issues/5320): Deprecate `MockBuilder::addMethods()` (this method only has a `@deprecated` annotation for now; using this method will trigger a deprecation warning in PHPUnit 11; this method will be removed in PHPUnit 12) * Using `......` in the XML configuration file to configure code that should be included in code coverage reporting is now deprecated and support for this will be removed in PHPUnit 11 (use `......` instead) * `PHPUnit\TextUI\Configuration\Configuration::hasNonEmptyListOfFilesToBeIncludedInCodeCoverageReport()` (use `hasNonEmptyListOfSourceFiles()` instead) * `PHPUnit\TextUI\Configuration\Configuration::coverageIncludeDirectories()` (use `sourceIncludeDirectories()` instead) diff --git a/src/Framework/MockObject/MockBuilder.php b/src/Framework/MockObject/MockBuilder.php index 2166ca30bda..29d6211b06d 100644 --- a/src/Framework/MockObject/MockBuilder.php +++ b/src/Framework/MockObject/MockBuilder.php @@ -194,6 +194,8 @@ public function onlyMethods(array $methods): self * @throws RuntimeException * * @return $this + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5320 */ public function addMethods(array $methods): self {