The fake() is basically the same as $this->faker.
Why do you use it for creating tens of thousands of records?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hey guys,
I was just writing tests and when using ->count on complex factories I ran into following error
Maximum retries of 10000 reached without finding a unique value while using $this->faker->unique()->words().
Switching to fake()->unique()->words() for some reason works though and now I'm wondering if there is a performance difference between using $this->faker and fake() helper.
Maybe someone can answer me this question :D
Please or to participate in this conversation.