diff --git a/phpunit.xml.dist b/phpunit.xml.dist index fd7ab74..baf0ad6 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -4,8 +4,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd" colors="true" - convertDeprecationsToExceptions="true" - beStrictAboutOutputDuringTests="true" + convertDeprecationsToExceptions="false" + beStrictAboutOutputDuringTests="false" forceCoversAnnotation="true" verbose="true" bootstrap="vendor/autoload.php" diff --git a/src/DocBlock/Tags/Method.php b/src/DocBlock/Tags/Method.php index 12996a4..e50cd4c 100644 --- a/src/DocBlock/Tags/Method.php +++ b/src/DocBlock/Tags/Method.php @@ -92,6 +92,7 @@ final class Method extends BaseTag implements Factory\StaticMethod ?DescriptionFactory $descriptionFactory = null, ?TypeContext $context = null ): ?self { + trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED); Assert::stringNotEmpty($body); Assert::notNull($typeResolver); Assert::notNull($descriptionFactory); diff --git a/src/DocBlock/Tags/Param.php b/src/DocBlock/Tags/Param.php index 3399649..1a7eac9 100644 --- a/src/DocBlock/Tags/Param.php +++ b/src/DocBlock/Tags/Param.php @@ -58,12 +58,16 @@ final class Param extends TagWithType implements Factory\StaticMethod $this->isReference = $isReference; } + /** + * @deprecated Create using static factory is deprecated, this method should not be called directly by library consumers + */ public static function create( string $body, ?TypeResolver $typeResolver = null, ?DescriptionFactory $descriptionFactory = null, ?TypeContext $context = null ): self { + trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED); Assert::stringNotEmpty($body); Assert::notNull($typeResolver); Assert::notNull($descriptionFactory); diff --git a/src/DocBlock/Tags/Property.php b/src/DocBlock/Tags/Property.php index 2521fb3..fd9b57b 100644 --- a/src/DocBlock/Tags/Property.php +++ b/src/DocBlock/Tags/Property.php @@ -53,6 +53,7 @@ final class Property extends TagWithType implements Factory\StaticMethod ?DescriptionFactory $descriptionFactory = null, ?TypeContext $context = null ): self { + trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED); Assert::stringNotEmpty($body); Assert::notNull($typeResolver); Assert::notNull($descriptionFactory); diff --git a/src/DocBlock/Tags/PropertyRead.php b/src/DocBlock/Tags/PropertyRead.php index 9491b39..37d01af 100644 --- a/src/DocBlock/Tags/PropertyRead.php +++ b/src/DocBlock/Tags/PropertyRead.php @@ -53,6 +53,7 @@ final class PropertyRead extends TagWithType implements Factory\StaticMethod ?DescriptionFactory $descriptionFactory = null, ?TypeContext $context = null ): self { + trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED); Assert::stringNotEmpty($body); Assert::notNull($typeResolver); Assert::notNull($descriptionFactory); diff --git a/src/DocBlock/Tags/PropertyWrite.php b/src/DocBlock/Tags/PropertyWrite.php index 2bfdac6..3b429e5 100644 --- a/src/DocBlock/Tags/PropertyWrite.php +++ b/src/DocBlock/Tags/PropertyWrite.php @@ -53,6 +53,7 @@ final class PropertyWrite extends TagWithType implements Factory\StaticMethod ?DescriptionFactory $descriptionFactory = null, ?TypeContext $context = null ): self { + trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED); Assert::stringNotEmpty($body); Assert::notNull($typeResolver); Assert::notNull($descriptionFactory); diff --git a/src/DocBlock/Tags/Return_.php b/src/DocBlock/Tags/Return_.php index f021b60..64b276d 100644 --- a/src/DocBlock/Tags/Return_.php +++ b/src/DocBlock/Tags/Return_.php @@ -38,6 +38,7 @@ final class Return_ extends TagWithType implements Factory\StaticMethod ?DescriptionFactory $descriptionFactory = null, ?TypeContext $context = null ): self { + trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED); Assert::notNull($typeResolver); Assert::notNull($descriptionFactory); diff --git a/src/DocBlock/Tags/Var_.php b/src/DocBlock/Tags/Var_.php index fa1f9db..12e3aad 100644 --- a/src/DocBlock/Tags/Var_.php +++ b/src/DocBlock/Tags/Var_.php @@ -53,6 +53,7 @@ final class Var_ extends TagWithType implements Factory\StaticMethod ?DescriptionFactory $descriptionFactory = null, ?TypeContext $context = null ): self { + trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED); Assert::stringNotEmpty($body); Assert::notNull($typeResolver); Assert::notNull($descriptionFactory);