Project

General

Profile

Actions

Feature #87457

closed

Use symfony/property-info to gather doc block information

Added by Alexander Schnitzler over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Category:
Extbase
Start date:
2019-01-16
Due date:
% Done:

100%

Estimated time:
PHP Version:
7.3
Tags:
Complexity:
Sprint Focus:

Description

This patch introduces the requirement to symfony/property-info
which provides a neat api to extract information about
properties via several different extractors.

The package comes with a PhpDocExtractor, which is kind of
a drop in replacement (functional wise) for the extbase
DocCommentParser which has been removed.

Along with the replacement of the doc block extractor
the package comes with an api to fetch context data that
enables us to resolve non fully qualified class names.

This is now possible:

```
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
use ExtbaseTeam\BlogExample\Domain\Model\Comment;

class Post {
/* * @var ObjectStorage<Comment>
*/
public $comments;
}
```

Important:
This only works in extbase models as the reflection
costs are high and the information is only needed
in this case.

The non fully qualified class name is now also
supported for injection properties, although it is
still recommended to avoid injection properties in
favor of injection methods or constructor injection.

Example:

```
use TYPO3\CMS\Extbase\Annotation as Extbase;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;

class Service {
/* * @Extbase\Inject * @var ConfigurationManager
*/
public $configurationManager;
}
```


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #88033: Massive performance degration since symfony/property-infoClosed2019-03-29

Actions
Related to TYPO3 Core - Feature #93197: Use symfony/property-info for method params tooClosed2020-12-31

Actions
Precedes TYPO3 Core - Bug #87838: ClassSchema must analyze all property doc blocksClosedAlexander Schnitzler2019-01-172019-01-17

Actions
Actions

Also available in: Atom PDF