Feature: #83078 - Replace @lazy with @TYPO3\CMS\Extbase\Annotation\ORM\Lazy

See forge#83078

Description

As a successor to the @lazy annotation, the doctrine annotation @TYPO3\CMS\Extbase\Annotation\ORM\Lazy has been introduced.

Example:

/**
 * @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
 * @var Foo
 */
public $property;

Doctrine annotations are actual defined classes, therefore you can also use the annotation with a use statement.

Example:

use TYPO3\CMS\Extbase\Annotation\ORM\Lazy;
/**
 * @Lazy
 * @var Foo
 */
public $property;

Used annotations can also be aliased which the core will most likely be using a lot in the future.

Example:

use TYPO3\CMS\Extbase\Annotation as Extbase;
/**
 * @Extbase\ORM\Lazy
 * @var Foo
 */
public $property;

Impact

In 9.x there is no actual impact. Both the simple @lazy and @TYPO3\CMS\Extbase\Annotation\ORM\Lazy can be used side by side. However, @lazy is deprecated in 9.x and will be removed in version 10.