Feature #87457

Use symfony/property-info to gather doc block information

Added by Alexander Schnitzler 3 months ago. Updated 27 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;
}
```


Related issues

Related to TYPO3 Core - Bug #88033: Massive performance degration since symfony/property-info New 2019-03-29
Precedes TYPO3 Core - Bug #87838: ClassSchema must analyze all property doc blocks Resolved 2019-01-17 2019-01-17

Associated revisions

Revision bcde6c01 (diff)
Added by Alexander Schnitzler 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months ago

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

#19 Updated by Alexander Schnitzler about 2 months ago

  • Precedes Bug #87838: ClassSchema must analyze all property doc blocks added

#20 Updated by Christian Kuhn 27 days ago

  • Related to Bug #88033: Massive performance degration since symfony/property-info added

#21 Updated by Christian Kuhn 27 days ago

This leads to a massive performance degration up to factor 7 rendering the backend and especially the install tool close to unusable with empty caches. see https://forge.typo3.org/issues/88033

Also available in: Atom PDF