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

add reference range name builder #347

Closed
wants to merge 22 commits into from
Closed

add reference range name builder #347

wants to merge 22 commits into from

Conversation

reinfi
Copy link
Contributor

@reinfi reinfi commented May 13, 2016

This builder would help to create fixtures for OneToOne relations within doctrine or other ORMs.

You could reference objects created earlier in your fixtures to create the same amount of instances.
You're free to select just one object or the whole list matched by a mask. The builder then creates as many instances as matched by your mask.

The only condition is that your fixtures must be declared within different files.

I saw this pull request #236. In a way it gives the opportunity to add own builders but in my case I need the object reference. Another idea could be to implemnent an ObjectsAwareInterface which sets the current objects to a builder if required.

@reinfi
Copy link
Contributor Author

reinfi commented May 13, 2016

Still no idea why the build fails, need to see if I can fix it tomorrow.


return $fixtures;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs an empty line at the end of the file

@theofidry
Copy link
Member

It is weird, they do pass locally when I pull out your branch...

@theofidry theofidry added this to the 2.x milestone May 13, 2016
@theofidry
Copy link
Member

@reinfi any leads on what is going wrong? Sorry I was a bit busy with #355...

reinfi added 2 commits May 16, 2016 00:39
# Conflicts:
#	src/Nelmio/Alice/Loader/Base.php
@reinfi
Copy link
Contributor Author

reinfi commented May 16, 2016

Finally I found it. I merged the latest changes in branch 2.x, it seems travis does this automatically. There were some changes so I fixed the test and the new builder to work with those changes.

@theofidry
Copy link
Member

Nice! I'm waiting for #355 to be merged and then I'll merge yours :)

@theofidry
Copy link
Member

@reinfi #355 as been merged! Could you please rebase your work? I hope you won't get too many conflicts...

@reinfi
Copy link
Contributor Author

reinfi commented Jan 31, 2017

Sorry @theofidry, this got totally out of my mind. I merged the latest 2.x branch now. What else is missing?

@theofidry
Copy link
Member

I think there was only the tests to fix left :)

I'm gonna take a new look at it and to a PR against master as well to ensure this feature is on both 2.x and 3.x. Thanks

This was referenced Mar 18, 2017
@theofidry
Copy link
Member

Closed via #693, it has been released in 2.3.0 :)

@theofidry theofidry closed this Mar 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants