Nicolas PHILIPPE

Results 319 comments of Nicolas PHILIPPE

Ho yes, of course, double `@template`, that makes sense. I'm in favor of this idea, even if it would break some CIs... that's not a big deal IMO. What's your...

Hi @d-cichon there is actually a feature to do this: ```php class MyFactory extends ObjectFactory { protected function initialize(): static { return $this ->instantiateWith( Instantiator::namedConstructor('namedConstructorMethod') ) } ``` I realize...

cool! is that really a phpstan problem? or just your IDE that does not understand what's going on?

I've documented [here](https://github.com/zenstruck/foundry/pull/703) the `namedConstructor` stuff. I'll close you issue once the PR will be closed. Feel free to re-open it if something is still problematic

Hello, would you mind to test [this PR](https://github.com/zenstruck/foundry/pull/704) please? I've finally decided to create a psalm extension, you may need to add this to your psalm.xml: ```xml ``` I've removed...

thanks for your answer! do you have that bunch of ugly annotations above your factories? ![image](https://github.com/user-attachments/assets/a5fb1ea5-8b5d-4c66-876a-fc37f56ec31c) without them and without the plugin, I cannot manage to get [a simple psalm...

Hello Could you create a reproducer repository that illustrate the problem, please?

Hi @mpiot thanks for the reproducer (and sorry for the late reply 😅) I get the problem now, you're right, the `afterInstantiate()` callback should see the objects. I'll work on...

> This is a great idea, we often forgot to add the Factories trait. thanks @VincentLanglet I also think this is where we should go. actually, my main concern about...

Hi @VincentLanglet any chance you provide a reproducer? even if it does not fail on each test run This problem could occur if [`faker()->seed()`](https://github.com/FakerPHP/Faker/blob/2.0/src/Generator.php#L685) (or even `mt_srand()`) is called twice...