@@ -31,7 +31,7 @@ between all of the constraints in your user table:
31
31
32
32
.. code-block :: php-annotations
33
33
34
- // src/Entity/Author .php
34
+ // src/Entity/User .php
35
35
namespace App\Entity;
36
36
37
37
use Symfony\Component\Validator\Constraints as Assert;
@@ -44,7 +44,7 @@ between all of the constraints in your user table:
44
44
* @ORM\Entity
45
45
* @UniqueEntity("email")
46
46
*/
47
- class Author
47
+ class User
48
48
{
49
49
/**
50
50
* @ORM\Column(name="email", type="string", length=255, unique=true)
@@ -56,7 +56,7 @@ between all of the constraints in your user table:
56
56
.. code-block :: yaml
57
57
58
58
# config/validator/validation.yaml
59
- App\Entity\Author :
59
+ App\Entity\User :
60
60
constraints :
61
61
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity : email
62
62
properties :
@@ -71,7 +71,7 @@ between all of the constraints in your user table:
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 =" App\Entity\Author " >
74
+ <class name =" App\Entity\User " >
75
75
<constraint name =" Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity" >
76
76
<option name =" fields" >email</option >
77
77
</constraint >
@@ -83,15 +83,15 @@ between all of the constraints in your user table:
83
83
84
84
.. code-block :: php
85
85
86
- // src/Entity/Author .php
86
+ // src/Entity/User .php
87
87
namespace App\Entity;
88
88
89
89
use Symfony\Component\Validator\Constraints as Assert;
90
90
91
91
// DON'T forget this use statement!!!
92
92
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
93
93
94
- class Author
94
+ class User
95
95
{
96
96
public static function loadValidatorMetadata(ClassMetadata $metadata)
97
97
{
0 commit comments