Skip to content

Commit b12a339

Browse files
committed
Add deprecations
1 parent 25d6965 commit b12a339

File tree

8 files changed

+12
-2
lines changed

8 files changed

+12
-2
lines changed

phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd"
66
colors="true"
7-
convertDeprecationsToExceptions="true"
8-
beStrictAboutOutputDuringTests="true"
7+
convertDeprecationsToExceptions="false"
8+
beStrictAboutOutputDuringTests="false"
99
forceCoversAnnotation="true"
1010
verbose="true"
1111
bootstrap="vendor/autoload.php"

src/DocBlock/Tags/Method.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public static function create(
9292
?DescriptionFactory $descriptionFactory = null,
9393
?TypeContext $context = null
9494
): ?self {
95+
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
9596
Assert::stringNotEmpty($body);
9697
Assert::notNull($typeResolver);
9798
Assert::notNull($descriptionFactory);

src/DocBlock/Tags/Param.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,16 @@ public function __construct(
5858
$this->isReference = $isReference;
5959
}
6060

61+
/**
62+
* @deprecated Create using static factory is deprecated, this method should not be called directly by library consumers
63+
*/
6164
public static function create(
6265
string $body,
6366
?TypeResolver $typeResolver = null,
6467
?DescriptionFactory $descriptionFactory = null,
6568
?TypeContext $context = null
6669
): self {
70+
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
6771
Assert::stringNotEmpty($body);
6872
Assert::notNull($typeResolver);
6973
Assert::notNull($descriptionFactory);

src/DocBlock/Tags/Property.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public static function create(
5353
?DescriptionFactory $descriptionFactory = null,
5454
?TypeContext $context = null
5555
): self {
56+
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
5657
Assert::stringNotEmpty($body);
5758
Assert::notNull($typeResolver);
5859
Assert::notNull($descriptionFactory);

src/DocBlock/Tags/PropertyRead.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public static function create(
5353
?DescriptionFactory $descriptionFactory = null,
5454
?TypeContext $context = null
5555
): self {
56+
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
5657
Assert::stringNotEmpty($body);
5758
Assert::notNull($typeResolver);
5859
Assert::notNull($descriptionFactory);

src/DocBlock/Tags/PropertyWrite.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public static function create(
5353
?DescriptionFactory $descriptionFactory = null,
5454
?TypeContext $context = null
5555
): self {
56+
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
5657
Assert::stringNotEmpty($body);
5758
Assert::notNull($typeResolver);
5859
Assert::notNull($descriptionFactory);

src/DocBlock/Tags/Return_.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public static function create(
3838
?DescriptionFactory $descriptionFactory = null,
3939
?TypeContext $context = null
4040
): self {
41+
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
4142
Assert::notNull($typeResolver);
4243
Assert::notNull($descriptionFactory);
4344

src/DocBlock/Tags/Var_.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public static function create(
5353
?DescriptionFactory $descriptionFactory = null,
5454
?TypeContext $context = null
5555
): self {
56+
trigger_error('Create using static factory is deprecated, this method should not be called directly by library consumers', E_USER_DEPRECATED);
5657
Assert::stringNotEmpty($body);
5758
Assert::notNull($typeResolver);
5859
Assert::notNull($descriptionFactory);

0 commit comments

Comments
 (0)