From ec7919325c69b7cc4ce054d284514c2bad60214d Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 12 Jul 2023 11:26:02 +0200 Subject: [PATCH] Deprecate all symbols in the Doctrine\Common\Proxy namespace --- phpstan.neon.dist | 10 +--------- src/Proxy/AbstractProxyFactory.php | 2 ++ src/Proxy/Autoloader.php | 2 ++ src/Proxy/Exception/InvalidArgumentException.php | 2 +- src/Proxy/Exception/OutOfBoundsException.php | 2 +- src/Proxy/Exception/ProxyException.php | 2 +- src/Proxy/Exception/UnexpectedValueException.php | 2 +- src/Proxy/Proxy.php | 2 ++ src/Proxy/ProxyDefinition.php | 2 ++ src/Proxy/ProxyGenerator.php | 2 ++ 10 files changed, 15 insertions(+), 13 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 748a07b21..beddadc4f 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -25,23 +25,15 @@ parameters: - message: '#^Result of method Doctrine\\Tests\\Common\\Proxy\\LazyLoadableObjectWithVoid::(adding|incrementing)AndReturningVoid\(\) \(void\) is used\.$#' path: 'tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php' - - - message: '#^Property Doctrine\\Tests\\Common\\Proxy\\ProxyLogicTest::\$initializerCallbackMock \(callable\(\): mixed&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject&stdClass\.$#' - path: 'tests/Common/Proxy/ProxyLogicTest.php' - message: '#.*LazyLoadableObject.*#' - paths: - - 'tests/Common/Proxy/ProxyLogicTest.php' - - 'tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php' + path: 'tests/Common/Proxy/ProxyLogicTest.php' - message: '#^Instantiated class Doctrine\\Tests\\Common\\ProxyProxy\\__CG__\\Doctrine\\Tests\\Common\\Proxy\\.* not found.$#' path: 'tests/Common/Proxy/ProxyLogicTest.php' - message: '#^Instantiated class Doctrine\\Tests\\Common\\ProxyProxy\\__CG__\\Doctrine\\Tests\\Common\\Proxy\\.* not found.$#' path: 'tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php' - - - message: '#^Property Doctrine\\Tests\\Common\\Proxy\\ProxyLogicVoidReturnTypeTest::\$initializerCallbackMock \(callable\(\): mixed&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject&stdClass\.$#' - path: 'tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php' - message: '#^Method Doctrine\\Tests\\Common\\Proxy\\MagicIssetClassWithInteger::__isset\(\) should return bool but returns int\.$#' path: 'tests/Common/Proxy/MagicIssetClassWithInteger.php' diff --git a/src/Proxy/AbstractProxyFactory.php b/src/Proxy/AbstractProxyFactory.php index d487e1a21..47320a952 100644 --- a/src/Proxy/AbstractProxyFactory.php +++ b/src/Proxy/AbstractProxyFactory.php @@ -15,6 +15,8 @@ /** * Abstract factory for proxy objects. + * + * @deprecated The AbstractProxyFactory class is deprecated since doctrine/common 3.5. */ abstract class AbstractProxyFactory { diff --git a/src/Proxy/Autoloader.php b/src/Proxy/Autoloader.php index ec2379ce4..9853ad1db 100644 --- a/src/Proxy/Autoloader.php +++ b/src/Proxy/Autoloader.php @@ -20,6 +20,8 @@ /** * Special Autoloader for Proxy classes, which are not PSR-0 compliant. * + * @deprecated The Autoloader class is deprecated since doctrine/common 3.5. + * * @internal */ class Autoloader diff --git a/src/Proxy/Exception/InvalidArgumentException.php b/src/Proxy/Exception/InvalidArgumentException.php index 998600e20..b50c009f0 100644 --- a/src/Proxy/Exception/InvalidArgumentException.php +++ b/src/Proxy/Exception/InvalidArgumentException.php @@ -13,7 +13,7 @@ /** * Proxy Invalid Argument Exception. * - * @link www.doctrine-project.org + * @deprecated The InvalidArgumentException class is deprecated since doctrine/common 3.5. */ class InvalidArgumentException extends BaseInvalidArgumentException implements ProxyException { diff --git a/src/Proxy/Exception/OutOfBoundsException.php b/src/Proxy/Exception/OutOfBoundsException.php index 0da3e9139..e69f0c432 100644 --- a/src/Proxy/Exception/OutOfBoundsException.php +++ b/src/Proxy/Exception/OutOfBoundsException.php @@ -9,7 +9,7 @@ /** * Proxy Invalid Argument Exception. * - * @link www.doctrine-project.org + * @deprecated The OutOfBoundsException class is deprecated since doctrine/common 3.5. */ class OutOfBoundsException extends BaseOutOfBoundsException implements ProxyException { diff --git a/src/Proxy/Exception/ProxyException.php b/src/Proxy/Exception/ProxyException.php index f827fbd03..59105d840 100644 --- a/src/Proxy/Exception/ProxyException.php +++ b/src/Proxy/Exception/ProxyException.php @@ -5,7 +5,7 @@ /** * Base exception interface for proxy exceptions. * - * @link www.doctrine-project.org + * @deprecated The ProxyException interface is deprecated since doctrine/common 3.5. */ interface ProxyException { diff --git a/src/Proxy/Exception/UnexpectedValueException.php b/src/Proxy/Exception/UnexpectedValueException.php index 49829f719..3ea078d95 100644 --- a/src/Proxy/Exception/UnexpectedValueException.php +++ b/src/Proxy/Exception/UnexpectedValueException.php @@ -10,7 +10,7 @@ /** * Proxy Unexpected Value Exception. * - * @link www.doctrine-project.org + * @deprecated The UnexpectedValueException class is deprecated since doctrine/common 3.5. */ class UnexpectedValueException extends BaseUnexpectedValueException implements ProxyException { diff --git a/src/Proxy/Proxy.php b/src/Proxy/Proxy.php index f723ac805..472e79d3c 100644 --- a/src/Proxy/Proxy.php +++ b/src/Proxy/Proxy.php @@ -8,6 +8,8 @@ /** * Interface for proxy classes. * + * @deprecated The Proxy interface is deprecated since doctrine/common 3.5. + * * @template T of object * @template-extends BaseProxy */ diff --git a/src/Proxy/ProxyDefinition.php b/src/Proxy/ProxyDefinition.php index a7f395738..6a5f92cae 100644 --- a/src/Proxy/ProxyDefinition.php +++ b/src/Proxy/ProxyDefinition.php @@ -6,6 +6,8 @@ /** * Definition structure how to create a proxy. + * + * @deprecated The ProxyDefinition class is deprecated since doctrine/common 3.5. */ class ProxyDefinition { diff --git a/src/Proxy/ProxyGenerator.php b/src/Proxy/ProxyGenerator.php index 5d5b67e38..30a8e1e9f 100644 --- a/src/Proxy/ProxyGenerator.php +++ b/src/Proxy/ProxyGenerator.php @@ -67,6 +67,8 @@ /** * This factory is used to generate proxy classes. * It builds proxies from given parameters, a template and class metadata. + * + * @deprecated The ProxyGenerator class is deprecated since doctrine/common 3.5. */ class ProxyGenerator {