@@ -206,7 +206,7 @@ constraint.
206206 }
207207 }
208208
209- If the callback is stored in a different class and is static, for example ``AppBundle \Entity\Genre ``,
209+ If the callback is stored in a different class and is static, for example ``App \Entity\Genre ``,
210210you can pass the class name and the method as an array.
211211
212212.. configuration-block ::
@@ -221,7 +221,7 @@ you can pass the class name and the method as an array.
221221 class Author
222222 {
223223 /**
224- * @Assert\Choice(callback={"AppBundle \Entity\Genre", "getGenres"})
224+ * @Assert\Choice(callback={"App \Entity\Genre", "getGenres"})
225225 */
226226 protected $genre;
227227 }
@@ -232,7 +232,7 @@ you can pass the class name and the method as an array.
232232 App\Entity\Author :
233233 properties :
234234 genre :
235- - Choice : { callback: [AppBundle \Entity\Genre, getGenres] }
235+ - Choice : { callback: [App \Entity\Genre, getGenres] }
236236
237237 .. code-block :: xml
238238
@@ -246,7 +246,7 @@ you can pass the class name and the method as an array.
246246 <property name =" genre" >
247247 <constraint name =" Choice" >
248248 <option name =" callback" >
249- <value >AppBundle \Entity\Genre</value >
249+ <value >App \Entity\Genre</value >
250250 <value >getGenres</value >
251251 </option >
252252 </constraint >
@@ -259,7 +259,7 @@ you can pass the class name and the method as an array.
259259 // src/Entity/Author.php
260260 namespace App\Entity;
261261
262- use AppBundle \Entity\Genre;
262+ use App \Entity\Genre;
263263 use Symfony\Component\Validator\Mapping\ClassMetadata;
264264 use Symfony\Component\Validator\Constraints as Assert;
265265
0 commit comments