diff --git a/.psalm/baseline.xml b/.psalm/baseline.xml
index 2140b55e5ed..2f18083bc20 100644
--- a/.psalm/baseline.xml
+++ b/.psalm/baseline.xml
@@ -234,6 +234,18 @@
$methods
$type
+
+ render(),
+ $className['className'],
+ )]]>
+ render(), $className['className'])]]>
+ new UnknownTraitException($traitName)
+ new UnknownTraitException($traitName)
+
+
+ mockObjectForAbstractClass
+
getMethod
@@ -263,6 +275,10 @@
+
+ mockObjectForAbstractClass
+ mockObjectForTrait
+
$object
$object
@@ -314,6 +330,10 @@
disableArgumentCloning
disallowMockingUnknownTypes
enableProxyingToOriginalMethods
+ generateClassFromWsdl
+ mockObjectForAbstractClass
+ mockObjectForTrait
+ objectForTrait
getMethod
diff --git a/src/Framework/MockObject/Generator/Exception/UnknownTraitException.php b/src/Framework/MockObject/Generator/Exception/UnknownTraitException.php
index 51f0c86c7d3..67cecfa9009 100644
--- a/src/Framework/MockObject/Generator/Exception/UnknownTraitException.php
+++ b/src/Framework/MockObject/Generator/Exception/UnknownTraitException.php
@@ -13,6 +13,8 @@
/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
+ *
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5243
*/
final class UnknownTraitException extends \PHPUnit\Framework\Exception implements Exception
{
diff --git a/src/Framework/MockObject/Generator/Generator.php b/src/Framework/MockObject/Generator/Generator.php
index 0216106ee78..dca00da1107 100644
--- a/src/Framework/MockObject/Generator/Generator.php
+++ b/src/Framework/MockObject/Generator/Generator.php
@@ -227,6 +227,8 @@ public function testDoubleForInterfaceIntersection(array $interfaces, bool $mock
* @throws RuntimeException
* @throws UnknownClassException
* @throws UnknownTypeException
+ *
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5241
*/
public function mockObjectForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = null, bool $cloneArguments = true): MockObject
{
@@ -286,6 +288,8 @@ interface_exists($originalClassName, $callAutoload)) {
* @throws UnknownClassException
* @throws UnknownTraitException
* @throws UnknownTypeException
+ *
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5243
*/
public function mockObjectForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = null, bool $cloneArguments = true): MockObject
{
@@ -323,6 +327,8 @@ public function mockObjectForTrait(string $traitName, array $arguments = [], str
* @throws ReflectionException
* @throws RuntimeException
* @throws UnknownTraitException
+ *
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5244
*/
public function objectForTrait(string $traitName, string $traitClassName = '', bool $callAutoload = true, bool $callOriginalConstructor = false, array $arguments = []): object
{
@@ -406,6 +412,8 @@ public function generate(string $type, bool $mockObject, array $methods = null,
/**
* @throws RuntimeException
* @throws SoapExtensionNotAvailableException
+ *
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5242
*/
public function generateClassFromWsdl(string $wsdlFile, string $className, array $methods = [], array $options = []): string
{
diff --git a/src/Framework/MockObject/Generator/MockTrait.php b/src/Framework/MockObject/Generator/MockTrait.php
index 72b007b2366..20e9301b602 100644
--- a/src/Framework/MockObject/Generator/MockTrait.php
+++ b/src/Framework/MockObject/Generator/MockTrait.php
@@ -13,6 +13,8 @@
/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
+ *
+ * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5243
*/
final class MockTrait implements MockType
{