Open simondaigre opened 3 months ago
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:
// Object1Factory
protected function defaults(): array|callable
{
return [
'object2' => Object2Factory::new()->withSomeObject(),
];
}
// Object2Factory
public function withSomeObject(): static
{
return $this->with(static fn (): array => ['object3' => Object3Factory::new(['prop1' => 'toto'])]);
}
any chance you create a public reproducer please?
ok, I confirm that there is a bug: CustomerFactory::new()->withUser()->create();
this creates two "customers"
Any update on this one? I have the same issue.
Hello there,
I'm upgrading a project from 1.38 to 2.0. With the Rector rule, the upgrade is really smooth, thanks @nikophil !
I just have a minor issue, in one Factory, in the
defaults()
method, I'm doing something like this :And in Customer factory :
With Foundry 1.38, my Customer was containing an User, since 2.0 User is always null. Is it something deprecated or a bug ?