1,2,3,4,3,4,3,5,6,5,6,5,4,3,4,5
mój YAML wygląda tak:
My\CostamBundle\Entity\User: user{Damian,Wojtek,Mateusz,Marcin,Krystian,Piotrek1,Tomek,Michał,Adam1,Przemek1,Łukasz,Piotrek2,Kuba,Przemek2,Adam2,Piotrek3}: username: <current()> password: <current()> email: <current()>@test.pl digit: <sentences(1,2,3,4,3,4,3,5,6,5,6,5,4,3,4,5)> priority: 1
niestety nie znalazłem w opisie bundla odpowiedniej funkcji, która może to zrobić.
Próbowałem więc na różne sposóby:
1) digit: [1,2,3,4,3,4,3,5,6,5,6,5,4,3,4,5] - wywala błąd 2) digit: (1,2,3,4,3,4,3,5,6,5,6,5,4,3,4,5) - ładuje same zera 3) digit: ({1,2,3,4,3,4,3,5,6,5,6,5,4,3,4,5}) - ładuje same zera 4) digit: {1,2,3,4,3,4,3,5,6,5,6,5,4,3,4,5} - wywala błąd 5) digit: array(1,2,3,4,3,4,3,5,6,5,6,5,4,3,4,5) - ładuje same zera 6) digit: <array(1,2,3,4,3,4,3,5,6,5,6,5,4,3,4,5)> - wywala błąd 7) digit: <sentences(1,2,3,4,3,4,3,5,6,5,6,5,4,3,4,5)> - ładuje same zera
Próbowałem zastosować też bundla fzaninotto/Faker ale nie ma tam takiej funkcji jakiej potrzebuję:
randomDigit // 7 randomDigitNotNull // 5 randomNumber($nbDigits = NULL) // 79907610 randomFloat($nbMaxDecimals = NULL, $min = 0, $max = NULL) // 48.8932 numberBetween($min = 1000, $max = 9000) // 8567 randomLetter // 'b' randomElements($array = array ('a','b','c'), $count = 1) // array('c') randomElement($array = array ('a','b','c')) // 'b' shuffle('hello, world') // 'rlo,h eoldlw' shuffle(array(1, 2, 3)) // array(2, 1, 3) numerify('Hello ###') // 'Hello 609' lexify('Hello?') // 'Hello wgt'
bothify('Hello ##') // 'Hello 42jz'
asciify('Hello ***') // 'Hello R6+' regexify('[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}'); // sm0@y8k96a.ej