thephpleague / factory-muffin

Enables the rapid creation of objects for testing
https://factory-muffin.thephpleague.com/
MIT License
532 stars 72 forks source link

Get all defined definitions #435

Closed ls-michielrensen closed 7 years ago

ls-michielrensen commented 7 years ago

This PR adds a small convenience method in order to get all defined model definitions. This is especially useful if you want to load different sets of factories based on the context.

GrahamCampbell commented 7 years ago

Are you getting them in order to mutate them? If so, I don't think this would be a good practice.

ls-michielrensen commented 7 years ago

No, I'm getting them in order to create them, I use it as a sort of seeder if you will.

GrahamCampbell commented 7 years ago

Ok, thanks for the PR. :)

ls-michielrensen commented 7 years ago

@GrahamCampbell as it adds a public method, I guess an update to the docs is needed as well? Do you know in what release this PR will be?