Nicolas PHILIPPE

Results 319 comments of Nicolas PHILIPPE

about `randomRange()`: I'd really like that we keep only relying on `doctrine/persistence`. Based on this constraint, I can only see half solutions, both being trade-offs: - we can use what...

yeah, this is perfectly understandable, what you've already done will really help, and have a perfect timing :)

I think `randomRange()` is still problematic: https://github.com/zenstruck/foundry/blob/2.x/src%2FPersistence%2FRepositoryDecorator.php#L219 See https://github.com/zenstruck/foundry/issues/612#issuecomment-2781526431

Hi @simondaigre > With the Rector rule, the upgrade is really smooth nice to hear that! :blush: You problem definitively sounds like a bug. I'm trying to reproduce it.

hmm I kinda made the same thing, but everything is hydrated as expected :thinking: ```php // Object1Factory protected function defaults(): array|callable { return [ 'object2' => Object2Factory::new()->withSomeObject(), ]; } //...

ok, I confirm that there is a bug: `CustomerFactory::new()->withUser()->create();` this creates two "customers"

hey @mmarton @simondaigre the bug is fied in https://github.com/zenstruck/foundry/pull/659 would you mind to test the PR before it gets merged?

yes thanks for this, I do see where it comes from, and I currently have no solution, have to dig a little bit more https://github.com/zenstruck/foundry/pull/659#discussion_r1658634353

ok, this problem is really hard to fix... I've found a solution, that MIGHT work, but I'm not so proud of it :sweat_smile: Could you test this PR https://github.com/zenstruck/foundry/pull/726 :pray:...