BehatExtension / DoctrineDataFixturesExtension

Doctrine Data Fixtures Extension for Behat
MIT License
20 stars 7 forks source link

Support fixtures as services introduced in DoctrineFixturesBundle 3.0 #3

Closed ruudk closed 6 years ago

ruudk commented 6 years ago

I'm using DoctrineFixturesBundle 3.0 in my Symfony 3.3 application. The new bundle changed the way fixtures are loaded. It now uses Symfony services.

Because of this, my fixtures are not usable with this extension.

Would it be possible for this extension to use the doctrine.fixtures.loader from DoctrineFixturesBundle 3.0?

ruudk commented 6 years ago

Started debugging the issue, and found out that it can be solved easily once the doctrine.fixtures.loader service is made public in DoctrineFixturesBundle. Will follow up with a PR once the other PR is merged :v:

Spomky commented 6 years ago

Hi,

@alcaeus is right when he said in https://github.com/doctrine/DoctrineFixturesBundle/pull/222#issuecomment-349214394 that the loader should be injected. The whole FixtureService should be updated and container should not be injected.

I will try to update that extension. It was created because the original repo looked abandonned and compatibility with sf3 was needed. I see a good oportunity here to bump to a major release and includes others changes.

ruudk commented 6 years ago

@Spomky Awesome 🎉 Let me know if you need help

vitalyiegorov commented 6 years ago

@Spomky Any success with implementation for Symfony 3

scaytrase commented 6 years ago

Any news here? This stop me from using this useful extension since my fixtures are already services, not container-aware

Spomky commented 6 years ago

Hi,

Sorry for the late answer. I have a lot of work at the moment and it is difficult to find time for that project.

The problem is that there are many changes to perform here; not only regarding the doctrine.fixtures.loader but also on every container calls ($container->getParameter() or $container->get()). I created a new branch (see #7) and I will try to fix that step by step.

Spomky commented 6 years ago

Hi all,

The PR is almost ready. I will be happy if you could test against that new branch (PrivateService). Depending on the results you have, I will merge it to the master branch.

Please note that it requires at least PHP 7.1. I dropped previous versions as there is no active support anymore and security support will end in less than 9 months.

Thanks

Spomky commented 6 years ago

Hi all,

Sorry for the delay. A new major release has been issued few minutes ago. It is tagged v5.0.0-beta.1. Many thanks to @scaytrase for its code review.

I will tag this version as stable by the end of March unless you find bugs/errors.

ruudk commented 6 years ago

@Spomky Thanks for this! Gonna try it out soon! 🙌

Spomky commented 6 years ago

Tagged v5.0.0. Thank you all for your help. Closing now.