Skip to content
Snippets Groups Projects
Commit 52db5fc1 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Align to phpdocumentor/reflection-docblock:5.4.0

New version phpdocumentor/reflection-docblock:5.4.0
changed the signature of DocBlockFactory::createInstance(),
which now points out a misuse in extbase.

The patch changes the instantiation and avoids
calling registerTagHandler() since this can and
should be hand over to createInstance() directly.

Resolves: #103614
Releases: main, 12.4
Change-Id: I344ef7df23dedd950c2775fe2fab93f7bb808786
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83751


Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent cc1cac4f
Branches
Tags
No related merge requests found
...@@ -20,6 +20,7 @@ namespace TYPO3\CMS\Extbase\Reflection; ...@@ -20,6 +20,7 @@ namespace TYPO3\CMS\Extbase\Reflection;
use Doctrine\Common\Annotations\AnnotationReader; use Doctrine\Common\Annotations\AnnotationReader;
use phpDocumentor\Reflection\DocBlock\Tags\Param; use phpDocumentor\Reflection\DocBlock\Tags\Param;
use phpDocumentor\Reflection\DocBlockFactory; use phpDocumentor\Reflection\DocBlockFactory;
use phpDocumentor\Reflection\DocBlockFactoryInterface;
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor; use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
use Symfony\Component\PropertyInfo\PropertyInfoExtractor; use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
...@@ -99,15 +100,8 @@ class ClassSchema ...@@ -99,15 +100,8 @@ class ClassSchema
*/ */
private $injectMethods = []; private $injectMethods = [];
/** private static ?PropertyInfoExtractor $propertyInfoExtractor = null;
* @var PropertyInfoExtractor private static ?DocBlockFactoryInterface $docBlockFactory = null;
*/
private static $propertyInfoExtractor;
/**
* @var DocBlockFactory
*/
private static $docBlockFactory;
/** /**
* Constructs this class schema * Constructs this class schema
...@@ -159,24 +153,25 @@ class ClassSchema ...@@ -159,24 +153,25 @@ class ClassSchema
} }
if (self::$docBlockFactory === null) { if (self::$docBlockFactory === null) {
self::$docBlockFactory = DocBlockFactory::createInstance(); self::$docBlockFactory = DocBlockFactory::createInstance([
self::$docBlockFactory->registerTagHandler('author', Null_::class); 'author' => Null_::class,
self::$docBlockFactory->registerTagHandler('covers', Null_::class); 'covers' => Null_::class,
self::$docBlockFactory->registerTagHandler('deprecated', Null_::class); 'deprecated' => Null_::class,
self::$docBlockFactory->registerTagHandler('link', Null_::class); 'link' => Null_::class,
self::$docBlockFactory->registerTagHandler('method', Null_::class); 'method' => Null_::class,
self::$docBlockFactory->registerTagHandler('property-read', Null_::class); 'property-read' => Null_::class,
self::$docBlockFactory->registerTagHandler('property', Null_::class); 'property' => Null_::class,
self::$docBlockFactory->registerTagHandler('property-write', Null_::class); 'property-write' => Null_::class,
self::$docBlockFactory->registerTagHandler('return', Null_::class); 'return' => Null_::class,
self::$docBlockFactory->registerTagHandler('see', Null_::class); 'see' => Null_::class,
self::$docBlockFactory->registerTagHandler('since', Null_::class); 'since' => Null_::class,
self::$docBlockFactory->registerTagHandler('source', Null_::class); 'source' => Null_::class,
self::$docBlockFactory->registerTagHandler('throw', Null_::class); 'throw' => Null_::class,
self::$docBlockFactory->registerTagHandler('throws', Null_::class); 'throws' => Null_::class,
self::$docBlockFactory->registerTagHandler('uses', Null_::class); 'uses' => Null_::class,
self::$docBlockFactory->registerTagHandler('var', Null_::class); 'var' => Null_::class,
self::$docBlockFactory->registerTagHandler('version', Null_::class); 'version' => Null_::class,
]);
} }
$this->reflectProperties($reflectionClass); $this->reflectProperties($reflectionClass);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment