I've created a fixtures loader class in Symfony with custom fakers.
One of this custom functions should return a name from an array of names depending on a non-random value. I'd like this value to be the $current variable when creating a collection of entities with Alice 2.x
As we can do something like this in the fixtures.yml file:
user{1..10}:
name: someName<current()>
I would like to pass that current value in to my custom function like so:
user{1..10}:
name: pickFromArray($current)
I've tried $current, current(), , , .... without success.
Thanks!
You need to use the returned value of
<current()>
function as parameter. Tested on hautelook/AliceBundle.