Closed fesor closed 10 years ago
It does work on other systems too, Kohana for example.
I have never used Doctrine in my life, but people are free to submit PR's to see if they can make it work (this would be awesome).
I think this is going to be a "no fix" for now. I'm sure I could get basic doctrine support sorted, but it would be so restricted, it's not worth it. Doctrine is fundamentally different to Eloquent. I think we need to keep the focus on doing a good job at supporting Eloquent, and other similar systems, rather than trying to please everybody, and doing a bad job.
As Scott said, we'd be interested if anyone with lots of Doctrine experience could send a pull. I'd definitely consider this for 3.0, and I assume Scott would too.
Doctrine is picking up steam in the Laravel community, and we need something exactly like this to setup our tests nicely.
Am happy to work on a PR if you guys are willing to accept. Would just need some sort of implementation adapter that could handle the attribute assigning.
@kirkbushell Sounds cool. If you do write anything, please write it against our experiential branch, which will land as 3.0. Currently, the plans for 3.0 are refactoring, and actually simplifying things.
We can't promise to "accept", but there definitely is an interest.
Unforchantly you will need full redesign of FactoryMuffin to do this. Or this will be just something not so useful. There are already several solutions for Doctrine, but i don't like it. Doctrine entities is more than just table views.
Sad, but there is nothing better than phactory for now (framework-independent, easy-to-use, blazing fast and can restore database state. Requires a lot of boilerplate code.). I thinking about to write component which generates blueprints from Doctrine mapping. It is possible to get ideas from phactory and phpmashinist to build modern and highly flexible solution.
@fesor Factory Muffin is framework independent, and is very flexible in the way we set attributes, and the way we persist the changes. We aim to be the best, while trying to reduce complexity.
@GrahamCampbell roger, will work on something over the next week and put something up.
@kirkbushell Awesome. Thanks. :)
Ping @kirkbushell.
@kirkbushell Did you make any progress with this? Would love to use Factory Muffin with Doctrine.
@joshhornby This was implemented already by @DavertMik, and is available in 3.x.
@GrahamCampbell Brilliant! Is there any docs on this yet?
Sorry, there are no docs, but reading over the tests might help. I have no time to write any decent upgrading docs, or usage docs for the doctrine stuff, sorry.
No worries, I will look over the tests. Thank you for the quick response :+1:
In readme there is one strange line
But this library seems to be working only with Laravel's Active Record models. Do you have any plans to make it usable with Doctrine?