Feature #87457

Use symfony/property-info to gather doc block information

Added by Alexander Schnitzler about 1 month ago. Updated 13 days ago.

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

100%

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;
}
```

Associated revisions

Revision bcde6c01 (diff)
Added by Alexander Schnitzler 13 days ago

[FEATURE] Use symfony/property-info to gather doc block information

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;
}
```

Releases: master
Resolves: #87457
Change-Id: I006aeb737b4bb9790fda257e12ba46a105d9b113
Reviewed-on: https://review.typo3.org/59454
Tested-by: TYPO3com <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Richard Haeser <>
Tested-by: Richard Haeser <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review about 1 month ago

  • Status changed from New to Under Review

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#2 Updated by Gerrit Code Review 30 days ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#3 Updated by Gerrit Code Review 27 days ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#4 Updated by Gerrit Code Review 27 days ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#5 Updated by Gerrit Code Review 24 days ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#6 Updated by Gerrit Code Review 22 days ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#7 Updated by Gerrit Code Review 18 days ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#8 Updated by Gerrit Code Review 16 days ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#9 Updated by Gerrit Code Review 15 days ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#10 Updated by Gerrit Code Review 15 days ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#11 Updated by Gerrit Code Review 15 days ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#12 Updated by Gerrit Code Review 15 days ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#13 Updated by Gerrit Code Review 15 days ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#14 Updated by Gerrit Code Review 15 days ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#15 Updated by Gerrit Code Review 15 days ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#16 Updated by Gerrit Code Review 15 days ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#17 Updated by Gerrit Code Review 14 days ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59454

#18 Updated by Anonymous 13 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF