Skip to content

Commit

Permalink
Soft-deprecate enableArgumentCloning() and disableArgumentCloning() for
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Apr 11, 2023
1 parent 7091289 commit c852bee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .psalm/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@
<code><![CDATA[$this->expectedException]]></code>
</ArgumentTypeCoercion>
<DeprecatedMethod>
<code>disableArgumentCloning</code>
<code>disallowMockingUnknownTypes</code>
<code>enableProxyingToOriginalMethods</code>
</DeprecatedMethod>
Expand Down
1 change: 1 addition & 0 deletions ChangeLog-10.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ All notable changes of the PHPUnit 10.1 release series are documented in this fi
* [#5306](https://github.com/sebastianbergmann/phpunit/issues/5306): Deprecate `MockBuilder::getMockForTrait()` (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)
* [#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)
* 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
4 changes: 4 additions & 0 deletions src/Framework/MockObject/MockBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ public function enableAutoload(): self
* Disables the cloning of arguments passed to mocked methods.
*
* @return $this
*
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5315
*/
public function disableArgumentCloning(): self
{
Expand All @@ -340,6 +342,8 @@ public function disableArgumentCloning(): self
* Enables the cloning of arguments passed to mocked methods.
*
* @return $this
*
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5315
*/
public function enableArgumentCloning(): self
{
Expand Down

0 comments on commit c852bee

Please sign in to comment.