symfony / symfony-docs

The Symfony documentation
https://symfony.com/doc
Other
2.16k stars 5.11k forks source link

[Bundles] DoctrineFixturesBundle is missing ODM related information #12602

Closed tarlepp closed 4 years ago

tarlepp commented 4 years ago

See this issue https://github.com/doctrine/DoctrineMongoDBBundle/issues/600

alcaeus commented 4 years ago

I'm not sure if DoctrineFixturesBundle should contain any ODM related documentation: while the name suggests that it takes care of fixtures for more projects, it only handles fixtures for ORM. ODM fixture functionality is completely contained in DoctrineMongoDBBundle.

tarlepp commented 4 years ago

hmm, true but there isn't really documentation for ODM fixtures under Bundles related to Doctrine project https://symfony.com/doc/bundles/ so maybe we need to to change that part to cover ODM related stuff too?

eg. currently https://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/index.html doesn't contain anything about fixtures.

tarlepp commented 4 years ago

I'm not sure if DoctrineFixturesBundle should contain any ODM related documentation: while the name suggests that it takes care of fixtures for more projects, it only handles fixtures for ORM. ODM fixture functionality is completely contained in DoctrineMongoDBBundle.

And for that I think that it would be more clearer to users if that DoctrineFixturesBundle documentation says that this bundle is for Doctrine ORM and not for ODM.

javiereguiluz commented 4 years ago

ODM fixture functionality is completely contained in DoctrineMongoDBBundle.

@alcaeus what do you think about doing the same with DoctrineBundle and ORM fixtures?

alcaeus commented 4 years ago

It's on my list of things - I wanted to start making some plans to treat ORM and ODM the same. The idea is to either move common functionality to DoctrineBridge and have an ORMFixturesBundle and ODMFixturesBundle (to avoid optional dependencies in the respective mapper bundles), or have a generic bundle and provide extra packages for mapper-specific glue code. It's on the table, but time is a severe constraint at the moment.

javiereguiluz commented 4 years ago

Closing in favor of https://github.com/doctrine/DoctrineFixturesBundle/pull/321

LorensoD commented 3 years ago

@tarlepp, did you find a way to get fixtures working using the DoctrineMongoDBBundle? Or is there any other way of writing fixtures for MongoDB which you could recommend?

tarlepp commented 3 years ago

@tarlepp, did you find a way to get fixtures working using the DoctrineMongoDBBundle? Or is there any other way of writing fixtures for MongoDB which you could recommend?

Nope, that doctrine/DoctrineFixturesBundle is not for ODM, I'm not sure if there is separated package for ODM.

alcaeus commented 3 years ago

@tarlepp, did you find a way to get fixtures working using the DoctrineMongoDBBundle? Or is there any other way of writing fixtures for MongoDB which you could recommend?

Nope, that doctrine/DoctrineFixturesBundle is not for ODM, I'm not sure if there is separated package for ODM.

Nope, the functionality is built into the doctrine/DoctrineMongoDBBundle, but requires the user to require the doctrine/data-fixtures package. See the doctrine:mongodb:fixtures:load command for more details.