Webonaute / DoctrineFixturesGeneratorBundle

Generate Fixture from your existing data in your database. You can specify the Entity name and the IDs you want to import in your fixture.
63 stars 47 forks source link

Support for Doctrine Custom Mapping Types and Entity constructor with arguments #40

Closed rvadym closed 6 years ago

rvadym commented 7 years ago
Webonaute commented 7 years ago

please, dont create pull request for 2 different feature in one.

For the constructor argument, can you provide a test case?

For the Custom mapping, I will look into it to see if there is no other way to avoid managing this by a try/catch exception.

thank.

rvadym commented 7 years ago

Hi Yeah, you are right, my solution for CMT is a bit ugly :) Just first what came to my mind.

About constructor argument. I tried to describe it in proposed doc update in PR, which is here Ask me if you still didn't get purpose of this update from docs, I'll try to be more specific.

But I just faced another problem which is related to this issue - generated fixture class must have constructor arguments as well.

The generated fixture file looks like this

$item1 = new MonthlyProgress();

but in fact it must be like this

$item1 = new MonthlyProgress(\Money\Money::USD(0));

Trying to solve this right now.

Webonaute commented 6 years ago

sorry for the delay. I am very busy these day.

Webonaute commented 6 years ago

I just accepted a pull request for constructor handling.