Skip to content

Commit

Permalink
Deprecate functionality removed in e84b162
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 12, 2023
1 parent dbd762d commit dd0bef1
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .psalm/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@
<code>mockObjectForAbstractClass</code>
<code>mockObjectForTrait</code>
<code>objectForTrait</code>
<code>registerMockObjectsFromTestArguments</code>
<code>registerMockObjectsFromTestArguments</code>
</DeprecatedMethod>
<MissingThrowsDocblock>
<code>getMethod</code>
Expand All @@ -425,6 +427,10 @@
<ArgumentTypeCoercion>
<code><![CDATA[$test->output()]]></code>
</ArgumentTypeCoercion>
<DeprecatedMethod>
<code>registerMockObjectsFromTestArgumentsRecursively</code>
<code>registerMockObjectsFromTestArgumentsRecursively</code>
</DeprecatedMethod>
<InvalidArgument>
<code>$var</code>
</InvalidArgument>
Expand Down Expand Up @@ -834,6 +840,7 @@
<code>hasCacheResultFile</code>
<code>hasCacheResultFile</code>
<code>hasCoverageCacheDirectory</code>
<code>registerMockObjectsFromTestArgumentsRecursively</code>
</DeprecatedMethod>
<MissingThrowsDocblock>
<code>baseline</code>
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog-10.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes of the PHPUnit 10.5 release series are documented in this fi

## [10.5.3] - 2023-MM-DD

### Deprecated

* `registerMockObjectsFromTestArgumentsRecursively` attribute on the `<phpunit>` element of the XML configuration file
* `PHPUnit\TextUI\Configuration\Configuration::registerMockObjectsFromTestArgumentsRecursively()`

### Fixed

* [#5614](https://github.com/sebastianbergmann/phpunit/issues/5614): Infinite recursion when data provider provides recursive array
Expand Down
1 change: 1 addition & 0 deletions DEPRECATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ This functionality is currently [soft-deprecated](https://phpunit.de/backward-co
| | `PHPUnit\TextUI\Configuration\Configuration::cliArgument()` | 10.4.0 | `PHPUnit\TextUI\Configuration\Configuration::cliArguments()[0]` |
| | `PHPUnit\TextUI\Configuration\Configuration::hasCliArgument()` | 10.4.0 | `PHPUnit\TextUI\Configuration\Configuration::hasCliArguments()` |
| | `PHPUnit\Framework\Constraint\Constraint::exporter()` | 10.4.0 | |
| | `PHPUnit\TextUI\Configuration\Configuration::registerMockObjectsFromTestArgumentsRecursively()` | 10.5.3 | |

## Hard Deprecations

Expand Down
5 changes: 5 additions & 0 deletions src/Framework/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,8 @@ final public function expectsOutput(): bool

/**
* @internal This method is not covered by the backward compatibility promise for PHPUnit
*
* @deprecated
*/
final public function registerMockObjectsFromTestArgumentsRecursively(): void
{
Expand Down Expand Up @@ -1827,6 +1829,9 @@ private function shouldInvocationMockerBeReset(MockObject $mock): bool
return !in_array($mock, $enumerator->enumerate($this->testResult), true);
}

/**
* @deprecated
*/
private function registerMockObjectsFromTestArguments(array $testArguments, Context $context = new Context): void
{
if ($this->registerMockObjectsFromTestArgumentsRecursively) {
Expand Down
3 changes: 3 additions & 0 deletions src/TextUI/Configuration/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,9 @@ public function requireCoverageMetadata(): bool
return $this->requireCoverageMetadata;
}

/**
* @deprecated
*/
public function registerMockObjectsFromTestArgumentsRecursively(): bool
{
return $this->registerMockObjectsFromTestArgumentsRecursively;
Expand Down
3 changes: 3 additions & 0 deletions src/TextUI/Configuration/Xml/PHPUnit.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ public function backupStaticProperties(): bool
return $this->backupStaticProperties;
}

/**
* @deprecated
*/
public function registerMockObjectsFromTestArgumentsRecursively(): bool
{
return $this->registerMockObjectsFromTestArgumentsRecursively;
Expand Down

0 comments on commit dd0bef1

Please sign in to comment.