Skip to content

Commit dd0bef1

Browse files
Deprecate functionality removed in e84b162
1 parent dbd762d commit dd0bef1

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

.psalm/baseline.xml

+7
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@
409409
<code>mockObjectForAbstractClass</code>
410410
<code>mockObjectForTrait</code>
411411
<code>objectForTrait</code>
412+
<code>registerMockObjectsFromTestArguments</code>
413+
<code>registerMockObjectsFromTestArguments</code>
412414
</DeprecatedMethod>
413415
<MissingThrowsDocblock>
414416
<code>getMethod</code>
@@ -425,6 +427,10 @@
425427
<ArgumentTypeCoercion>
426428
<code><![CDATA[$test->output()]]></code>
427429
</ArgumentTypeCoercion>
430+
<DeprecatedMethod>
431+
<code>registerMockObjectsFromTestArgumentsRecursively</code>
432+
<code>registerMockObjectsFromTestArgumentsRecursively</code>
433+
</DeprecatedMethod>
428434
<InvalidArgument>
429435
<code>$var</code>
430436
</InvalidArgument>
@@ -834,6 +840,7 @@
834840
<code>hasCacheResultFile</code>
835841
<code>hasCacheResultFile</code>
836842
<code>hasCoverageCacheDirectory</code>
843+
<code>registerMockObjectsFromTestArgumentsRecursively</code>
837844
</DeprecatedMethod>
838845
<MissingThrowsDocblock>
839846
<code>baseline</code>

ChangeLog-10.5.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes of the PHPUnit 10.5 release series are documented in this fi
44

55
## [10.5.3] - 2023-MM-DD
66

7+
### Deprecated
8+
9+
* `registerMockObjectsFromTestArgumentsRecursively` attribute on the `<phpunit>` element of the XML configuration file
10+
* `PHPUnit\TextUI\Configuration\Configuration::registerMockObjectsFromTestArgumentsRecursively()`
11+
712
### Fixed
813

914
* [#5614](https://github.com/sebastianbergmann/phpunit/issues/5614): Infinite recursion when data provider provides recursive array

DEPRECATIONS.md

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ This functionality is currently [soft-deprecated](https://phpunit.de/backward-co
7474
| | `PHPUnit\TextUI\Configuration\Configuration::cliArgument()` | 10.4.0 | `PHPUnit\TextUI\Configuration\Configuration::cliArguments()[0]` |
7575
| | `PHPUnit\TextUI\Configuration\Configuration::hasCliArgument()` | 10.4.0 | `PHPUnit\TextUI\Configuration\Configuration::hasCliArguments()` |
7676
| | `PHPUnit\Framework\Constraint\Constraint::exporter()` | 10.4.0 | |
77+
| | `PHPUnit\TextUI\Configuration\Configuration::registerMockObjectsFromTestArgumentsRecursively()` | 10.5.3 | |
7778

7879
## Hard Deprecations
7980

src/Framework/TestCase.php

+5
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,8 @@ final public function expectsOutput(): bool
601601

602602
/**
603603
* @internal This method is not covered by the backward compatibility promise for PHPUnit
604+
*
605+
* @deprecated
604606
*/
605607
final public function registerMockObjectsFromTestArgumentsRecursively(): void
606608
{
@@ -1827,6 +1829,9 @@ private function shouldInvocationMockerBeReset(MockObject $mock): bool
18271829
return !in_array($mock, $enumerator->enumerate($this->testResult), true);
18281830
}
18291831

1832+
/**
1833+
* @deprecated
1834+
*/
18301835
private function registerMockObjectsFromTestArguments(array $testArguments, Context $context = new Context): void
18311836
{
18321837
if ($this->registerMockObjectsFromTestArgumentsRecursively) {

src/TextUI/Configuration/Configuration.php

+3
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,9 @@ public function requireCoverageMetadata(): bool
926926
return $this->requireCoverageMetadata;
927927
}
928928

929+
/**
930+
* @deprecated
931+
*/
929932
public function registerMockObjectsFromTestArgumentsRecursively(): bool
930933
{
931934
return $this->registerMockObjectsFromTestArgumentsRecursively;

src/TextUI/Configuration/Xml/PHPUnit.php

+3
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,9 @@ public function backupStaticProperties(): bool
453453
return $this->backupStaticProperties;
454454
}
455455

456+
/**
457+
* @deprecated
458+
*/
456459
public function registerMockObjectsFromTestArgumentsRecursively(): bool
457460
{
458461
return $this->registerMockObjectsFromTestArgumentsRecursively;

0 commit comments

Comments
 (0)