Skip to content

Commit

Permalink
Soft-deprecate addMethods() for #5320
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Apr 12, 2023
1 parent c852bee commit 8e0287c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog-10.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<coverage><include>...</include><exclude>...</exclude></coverage>` 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 `<source><include>...</include><exclude>...</exclude></source>` instead)
* `PHPUnit\TextUI\Configuration\Configuration::hasNonEmptyListOfFilesToBeIncludedInCodeCoverageReport()` (use `hasNonEmptyListOfSourceFiles()` instead)
* `PHPUnit\TextUI\Configuration\Configuration::coverageIncludeDirectories()` (use `sourceIncludeDirectories()` instead)
Expand Down
2 changes: 2 additions & 0 deletions src/Framework/MockObject/MockBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 8e0287c

Please sign in to comment.