@@ -27,8 +27,8 @@ configure the ``Traverse`` constraint on the ``Book`` class.
27
27
28
28
.. code-block :: php-annotations
29
29
30
- // src/AppBundle/ Entity/Book.php
31
- namespace AppBundle \Entity;
30
+ // src/Entity/Book.php
31
+ namespace App \Entity;
32
32
33
33
use Symfony\Component\Validator\Constraints as Assert;
34
34
use Doctrine\ORM\Mapping as ORM;
@@ -42,14 +42,14 @@ configure the ``Traverse`` constraint on the ``Book`` class.
42
42
/**
43
43
* @var Author
44
44
*
45
- * @ORM\ManyToOne(targetEntity="AppBundle \Entity\Author")
45
+ * @ORM\ManyToOne(targetEntity="App \Entity\Author")
46
46
*/
47
47
protected $author;
48
48
49
49
/**
50
50
* @var Editor
51
51
*
52
- * @ORM\ManyToOne(targetEntity="AppBundle \Entity\Editor")
52
+ * @ORM\ManyToOne(targetEntity="App \Entity\Editor")
53
53
*/
54
54
protected $editor;
55
55
@@ -58,28 +58,28 @@ configure the ``Traverse`` constraint on the ``Book`` class.
58
58
59
59
.. code-block :: yaml
60
60
61
- # src/AppBundle/Resources/ config/validation.yml
62
- AppBundle \Entity\Book :
61
+ # config/validator/ validation.yaml
62
+ App \Entity\Book :
63
63
constraints :
64
64
- Symfony\Component\Validator\Constraints\Traverse : ~
65
65
66
66
.. code-block :: xml
67
67
68
- <!-- src/AppBundle/Resources/ config/validation.xml -->
68
+ <!-- config/validator /validation.xml -->
69
69
<?xml version =" 1.0" encoding =" UTF-8" ?>
70
70
<constraint-mapping xmlns =" http://symfony.com/schema/dic/constraint-mapping"
71
71
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
72
72
xsi : schemaLocation =" http://symfony.com/schema/dic/constraint-mapping https://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd" >
73
73
74
- <class name =" AppBundle \Entity\Book" >
74
+ <class name =" App \Entity\Book" >
75
75
<constraint name =" Symfony\Component\Validator\Constraints\Traverse" />
76
76
</class >
77
77
</constraint-mapping >
78
78
79
79
.. code-block :: php
80
80
81
- // src/AppBundle/ Entity/Book.php
82
- namespace AppBundle \Entity;
81
+ // src/Entity/Book.php
82
+ namespace App \Entity;
83
83
84
84
use Symfony\Component\Validator\Constraints as Assert;
85
85
use Symfony\Component\Validator\Mapping\ClassMetadata;
0 commit comments