Feature: #83167 - Replace @validate with @TYPO3\CMS\Extbase\Annotation\Validate¶
See forge#83167
Description¶
As a successor to the @validate
annotation, the doctrine annotation
@TYPO3\
has been introduced.
Example:¶
/**
* @TYPO3\CMS\Extbase\Annotation\Validate
* @var Foo
*/
public $property;
Copied!
Doctrine annotations are actual defined classes, therefore you can also use the annotation with a use statement.
Example:¶
use TYPO3\CMS\Extbase\Annotation\Validate;
Copied!
/**
* @Validate
* @var Foo
*/
public $property;
Copied!
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;
Copied!
/**
* @Extbase\Validate
* @var Foo
*/
public $property;
Copied!
Impact¶
In v9 there is no actual impact. Both the simple @validate
and
@TYPO3\
can be used side by side.
However, @validate
is deprecated in v9 and will be removed in v10.