Skip to content

Commit

Permalink
Add extra deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
jaapio committed Mar 20, 2024
1 parent fc9a233 commit f2057d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/DocBlock/Tags/Factory/ParamFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace phpDocumentor\Reflection\DocBlock\Tags\Factory;

use Doctrine\Deprecations\Deprecation;
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\DocBlock\Tag;
use phpDocumentor\Reflection\DocBlock\Tags\Param;
Expand Down Expand Up @@ -37,6 +38,14 @@ public function create(PhpDocTagNode $node, Context $context): Tag
$tagValue = $node->value;

if ($tagValue instanceof InvalidTagValueNode) {
Deprecation::trigger(
'phpdocumentor/reflection-docblock',
'https://github.com/phpDocumentor/ReflectionDocBlock/issues/362',
sprintf(
'Param tag value "%s" is invalid, falling back to legacy parsing. Please update your docblocks.',
$tagValue->value
)
);
return Param::create($tagValue->value, $this->typeResolver, $this->descriptionFactory, $context);
}

Expand Down

0 comments on commit f2057d4

Please sign in to comment.