Nicolas PHILIPPE
Nicolas PHILIPPE
I've managed to reproduce your problem in the tests! I think you won't need to create any reproducer app :crossed_fingers:
Hey @norkunas thank you for this report. > but that's just nonsense to add this to 100+ factories you're absolutely right, we're gonna find a solution! After some times scratching...
ok so this is a bug in PHPStan... I think the simplest solution is to add return type `array|callable` everywhere. I'll add a rector rule for this
wow sorry, I haven't seen that big :facepalm: here that's strange it did not occurred to me... is that coming from level 9? (I'm only using level 8 on my...
@svianney would you mind opening an issue related to your problem, please?
I'm closing this, since https://github.com/zenstruck/foundry/issues/701 has been opened, and we are stuck with a PHPStan's bug. I might create a PHPStan extension some day, which will fix the problem, and...
hey, this has been fixed by https://github.com/zenstruck/foundry/pull/690 which will be released soon!
Hi @seb-jean there are two different topics here ### about an `exclude()` method I'm a bit torn about this: supporting a `not` operator (as well as a `or` operator) would...
about the uniqueness, maybe something like this would be ok? ```php VisitFactory::createMany(100, [ 'visitor' => $userTest, 'visited' => unique(fn() => UserFactory::createMany(100)), ]); ``` the `unique()` helper could take a callable...
not directly with `createMany()`, but this method exists (or actually, it WILL exist, not released yet) on `FactoryCollection` class: ```php // both of these lines are equivalent: VisitFactory::createMany(); VisitFactory::new()->many()->create(); //...