Skip to content

Commit 9c40497

Browse files
committed
minor symfony#11406 Corrected class name in example (jschaedl)
This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes symfony#11406). Discussion ---------- Corrected class name in example <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- fe35fef Corrected class name in example
2 parents c5f36ad + fe35fef commit 9c40497

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

reference/constraints/UniqueEntity.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ your user table:
3535

3636
.. code-block:: php-annotations
3737
38-
// src/AppBundle/Entity/Author.php
38+
// src/AppBundle/Entity/User.php
3939
namespace AppBundle\Entity;
4040
4141
use Symfony\Component\Validator\Constraints as Assert;
@@ -48,7 +48,7 @@ your user table:
4848
* @ORM\Entity
4949
* @UniqueEntity("email")
5050
*/
51-
class Author
51+
class User
5252
{
5353
/**
5454
* @ORM\Column(name="email", type="string", length=255, unique=true)
@@ -60,7 +60,7 @@ your user table:
6060
.. code-block:: yaml
6161
6262
# src/AppBundle/Resources/config/validation.yml
63-
AppBundle\Entity\Author:
63+
AppBundle\Entity\User:
6464
constraints:
6565
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: email
6666
properties:
@@ -75,7 +75,7 @@ your user table:
7575
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7676
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping https://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
7777
78-
<class name="AppBundle\Entity\Author">
78+
<class name="AppBundle\Entity\User">
7979
<constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
8080
<option name="fields">email</option>
8181
</constraint>
@@ -87,15 +87,15 @@ your user table:
8787
8888
.. code-block:: php
8989
90-
// src/AppBundle/Entity/Author.php
90+
// src/AppBundle/Entity/User.php
9191
namespace AppBundle\Entity;
9292
9393
use Symfony\Component\Validator\Constraints as Assert;
9494
9595
// DON'T forget this use statement!!!
9696
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
9797
98-
class Author
98+
class User
9999
{
100100
public static function loadValidatorMetadata(ClassMetadata $metadata)
101101
{

0 commit comments

Comments
 (0)