Closed MichaelBrauner closed 1 week ago
Hi Michael, thanks for the report. This is indeed confusing.
It is indeed a random category (each are created by createOne). I think I was trying to demonstrate the first category (with the one with name 'php' being overridden by the second). Confusing just describing that 😵💫
I am currently using the Zenstruck Foundry Bundle and finding it very helpful. However, I came across a section in the documentation that seems a bit unclear to me, and I was wondering if you could help clarify.
The section is located here. There's an example code snippet that shows how to use the withAttributes method in the factory:
In this code, a new Category instance is created with the name 'php' for each Post. However, in the comments of the following getCategory() method calls, it is indicated that the Category is random:
Could you help clarify if the Category should indeed be random as per the comments, or if it should be the 'php' category as created in the withAttributes method call? Is there a piece of the puzzle I'm missing here, or could the documentation benefit from some clarification?
Thanks for your time and all the hard work on this bundle. Looking forward to your response.
Best, Michael