zenstruck / foundry

A model factory library for creating expressive, auto-completable, on-demand dev/test fixtures with Symfony and Doctrine.
https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html
MIT License
607 stars 62 forks source link

[2.x] remove `@method` from `make:factory` #596

Open nikophil opened 1 month ago

nikophil commented 1 month ago

since in Foundry 2.x, autocompletion comes out of the box (in recent phpstorm versions, and I'm pretty sure it works in VS code as well)

instead, provide an option --with-phpdoc which would only add the doc if the option is provided

Aerendir commented 1 week ago

It (almost) works out of the box: it has a return type hint equal to mixed, so static analyzers will complain if you pass the returned object somewhere the accepted type is YourEntity as it is marked as mixed.

The annotation serves to specify the correct returned type.

nikophil commented 6 days ago

Hi!

Which method are you talking about?