Skip to content

Factory::build should take times() into account #107

@vlakoff

Description

@vlakoff

This generates, persists, and returns a collection of items:

Factory::times(42)->create(...);

Whereas this generates and returns only one item, ignoring the times() call:

Factory::times(42)->build(...);

For consistency and least astonishment, Factory::build should take times() into account. I can't think of any API/BC break, can you?

About implementation, beware: create iteratively calls persist, which in turn calls build, don't loop in another loop!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions