doctrine / DoctrineFixturesBundle

Symfony integration for the doctrine/data-fixtures library
MIT License
2.46k stars 203 forks source link

add tag option #219 #255

Closed EliasDeVos closed 5 years ago

EliasDeVos commented 6 years ago

for issue #219 In my Kernel.php i add the correct tag in the buildmethod since the rest is done through autoConfigure $container->registerForAutoconfiguration(StagingFixtures::class) ->addTag('doctrine.fixture.orm', ['set' => 'staging']) ;

Right know you pass --tag as a parameter to the command. It is also not possible to change staging with an array because symfony gives me the following exception A "tags" attribute must be of a scalar-type for service

Let me know what i have to change or if things should be written different

EliasDeVos commented 6 years ago

I changed the things you requested. i created a test but still need to test it. I need to add it to a normal symfony project to run it right ? (new to symfony) (the tests pass :) )

EliasDeVos commented 6 years ago

@alcaeus and @weaverryan can you give an update on this pull request in relation to #256 ? Can this one be merged ?

alcaeus commented 6 years ago

Sorry for the delay, I haven't yet had a chance to get a good look at #256 but will check that out in the coming days and then decide how we proceed. Thank you for the patience!

EliasDeVos commented 5 years ago

so @alcaeus don't wanna rush you, but made any decisions yet ? :)

alcaeus commented 5 years ago

Sorry for the delay, I forgot to update the issues here. I talked to @weaverryan about this and decided that it would make sense to allow both ways - one for linking via code and one for linking via config, with the latter overriding the former. Thus, we should coordinate with Ryan and @noemiquezada to make sure we can bring these features together to use the same base (e.g. the same syntax for loading fixtures, just a different syntax for defining groups).

weaverryan commented 5 years ago

Both approaches have been combined in #260 - and original authors' work + commits were maintained :)