Feature #87457
Use symfony/property-info to gather doc block information
100%
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
[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 <noreply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Richard Haeser <richard@maxserv.com>
Tested-by: Richard Haeser <richard@maxserv.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
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
Applied in changeset bcde6c0177aba345b0bd363c4519892a132ef279.