[BUGFIX] Show correct ReST file for @validate annotation
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / 9.3 / Feature-83167-ReplaceValidateWithTYPO3CMSExtbaseAnnotationValidate.rst
1 .. include:: ../../Includes.txt
2
3 ===============================================================================
4 Feature: #83167 - Replace @validate with @TYPO3\CMS\Extbase\Annotation\Validate
5 ===============================================================================
6
7 See :issue:`83167`
8
9 Description
10 ===========
11
12 As a successor to the :php:`@validate` annotation, the doctrine annotation
13 :php:`@TYPO3\CMS\Extbase\Annotation\Validate` has been introduced.
14
15
16 Example:
17 --------
18
19 .. code-block:: php
20
21 /**
22 * @TYPO3\CMS\Extbase\Annotation\Validate
23 * @var Foo
24 */
25 public $property;
26
27 Doctrine annotations are actual defined classes, therefore you can also use the annotation with a use statement.
28
29
30 Example:
31 --------
32
33 .. code-block:: php
34
35 use TYPO3\CMS\Extbase\Annotation\Validate;
36
37 .. code-block:: php
38
39 /**
40 * @Validate
41 * @var Foo
42 */
43 public $property;
44
45 Used annotations can also be aliased which the core will most likely be using a lot in the future.
46
47
48 Example:
49 --------
50
51 .. code-block:: php
52
53 use TYPO3\CMS\Extbase\Annotation as Extbase;
54
55 .. code-block:: php
56
57 /**
58 * @Extbase\Validate
59 * @var Foo
60 */
61 public $property;
62
63
64 Impact
65 ======
66
67 In v9 there is no actual impact. Both the simple :php:`@validate` and
68 :php:`@TYPO3\CMS\Extbase\Annotation\Validate` can be used side by side.
69 However, :php:`@validate` is deprecated in v9 and will be removed in v10.
70
71 .. index:: PHP-API, ext:extbase, FullyScanned