Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Pass group (or groups) that were used to call the fixture #372

Open
AntonioCS opened this issue Oct 15, 2021 · 0 comments

Comments

@AntonioCS
Copy link

AntonioCS commented Oct 15, 2021

I have a fixture that I plan to use for 2 groups.

The issue is that I would like to load different data sets depending on what group was called.
Currently the group is not passed to the fixture.

I believe this feature might be useful for default settings that may vary from dev to production.

So having the group name would make this simple to do.

Possible implementation:

public function load(ObjectManager $manager, ?array $groups = null) : void

It would be an empty array if no groups are passed but if there were groups it would just contain all the groups used.

Edit: Updated example code as not to be BC break ($groups defaults to null)

@AntonioCS AntonioCS changed the title Feature request: Feature request: Pass group (or groups) that were used to call the fixture Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant