Skip to content

Commit ec3ee5e

Browse files
author
Éric
committed
fixup! Callback Validation Constraint: Remove reference to deprecated option
1 parent 3754164 commit ec3ee5e

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

reference/constraints/Callback.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Configuration
3535

3636
.. code-block:: php-annotations
3737
38-
// src/Acme/BlogBundle/Entity/Author.php
39-
namespace Acme\BlogBundle\Entity;
38+
// src/AppBundle/Entity/Author.php
39+
namespace AppBundle\Entity;
4040
4141
use Symfony\Component\Validator\Constraints as Assert;
4242
use Symfony\Component\Validator\Context\ExecutionContextInterface;
@@ -56,28 +56,28 @@ Configuration
5656
5757
.. code-block:: yaml
5858
59-
# src/Acme/BlogBundle/Resources/config/validation.yml
60-
Acme\BlogBundle\Entity\Author:
59+
# src/AppBundle/Resources/config/validation.yml
60+
AppBundle\Entity\Author:
6161
constraints:
6262
- Callback: [validate]
6363
6464
.. code-block:: xml
6565
66-
<!-- src/Acme/BlogBundle/Resources/config/validation.xml -->
66+
<!-- src/AppBundle/Resources/config/validation.xml -->
6767
<?xml version="1.0" encoding="UTF-8" ?>
6868
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
6969
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7070
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
7171
72-
<class name="Acme\BlogBundle\Entity\Author">
72+
<class name="AppBundle\Entity\Author">
7373
<constraint name="Callback">validate</constraint>
7474
</class>
7575
</constraint-mapping>
7676
7777
.. code-block:: php
7878
79-
// src/Acme/BlogBundle/Entity/Author.php
80-
namespace Acme\BlogBundle\Entity;
79+
// src/AppBundle/Entity/Author.php
80+
namespace AppBundle\Entity;
8181
8282
use Symfony\Component\Validator\Mapping\ClassMetadata;
8383
use Symfony\Component\Validator\Constraints as Assert;
@@ -187,8 +187,8 @@ You can then use the following configuration to invoke this validator:
187187

188188
.. code-block:: php-annotations
189189
190-
// src/Acme/BlogBundle/Entity/Author.php
191-
namespace Acme\BlogBundle\Entity;
190+
// src/AppBundle/Entity/Author.php
191+
namespace AppBundle\Entity;
192192
193193
use Symfony\Component\Validator\Constraints as Assert;
194194
@@ -201,20 +201,20 @@ You can then use the following configuration to invoke this validator:
201201
202202
.. code-block:: yaml
203203
204-
# src/Acme/BlogBundle/Resources/config/validation.yml
205-
Acme\BlogBundle\Entity\Author:
204+
# src/AppBundle/Resources/config/validation.yml
205+
AppBundle\Entity\Author:
206206
constraints:
207207
- Callback: [Vendor\Package\Validator, validate]
208208
209209
.. code-block:: xml
210210
211-
<!-- src/Acme/BlogBundle/Resources/config/validation.xml -->
211+
<!-- src/AppBundle/Resources/config/validation.xml -->
212212
<?xml version="1.0" encoding="UTF-8" ?>
213213
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
214214
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
215215
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
216216
217-
<class name="Acme\BlogBundle\Entity\Author">
217+
<class name="AppBundle\Entity\Author">
218218
<constraint name="Callback">
219219
<value>Vendor\Package\Validator</value>
220220
<value>validate</value>
@@ -224,8 +224,8 @@ You can then use the following configuration to invoke this validator:
224224
225225
.. code-block:: php
226226
227-
// src/Acme/BlogBundle/Entity/Author.php
228-
namespace Acme\BlogBundle\Entity;
227+
// src/AppBundle/Entity/Author.php
228+
namespace AppBundle\Entity;
229229
230230
use Symfony\Component\Validator\Mapping\ClassMetadata;
231231
use Symfony\Component\Validator\Constraints as Assert;
@@ -252,8 +252,8 @@ You can then use the following configuration to invoke this validator:
252252
When configuring the constraint via PHP, you can also pass a closure to the
253253
constructor of the Callback constraint::
254254

255-
// src/Acme/BlogBundle/Entity/Author.php
256-
namespace Acme\BlogBundle\Entity;
255+
// src/AppBundle/Entity/Author.php
256+
namespace AppBundle\Entity;
257257

258258
use Symfony\Component\Validator\Mapping\ClassMetadata;
259259
use Symfony\Component\Validator\Constraints as Assert;

0 commit comments

Comments
 (0)