Open wouterj opened 11 years ago
I think doctrine:phpcr:generate:documents
would be most consistent with what we already have.
I see, but that means all commands for phpcr odm are inconsistent with other doctrine projects.
ORM:
$ php app/console doctrine:generate:entities AcmeBlogBundle
MongoDB:
$ php app/console doctrine:mongodb:generate:documents AcmeStoreBundle
PhpcrOdm
$ php app/console doctrine:phpcr:generate documents AcmeStoreBundle
The latter two are the "bundled" commands, i.e. they wrap odm:generate:documents
and I guess what would be phpcr:generate:documents
in the PHPCR\Commands.
hmm ignore what I said about wrapping a PHPCR command - that makes no sense at all :)
@dantleech, all commands you show are the commands of the bundles (DoctrineBundle and DoctrineMongoDbBundle). Those bundles extend a command that is defined in their library (resp. orm and mongodb odm). In this issue, I'm not talking about the command names for the DoctrinePHPCRBundle, but about the command names of the phpcr-odm library (so the command you use when using phpcr odm standalone).
Hmm. A dilema. phpcr:generate:documents
would indeedbe wrong. @dbu
Wouter J notifications@github.com wrote:
@dantleech, all commands you show are the commands of the bundles (DoctrineBundle and DoctrineMongoDbBundle). Those bundles extend a base command, which is defined in their library (resp. orm and mongodb odm). In this issue, I'm not talking about the command names for the DoctrinePHPCRBundle, but about the command names of the phpcr-odm library.
Reply to this email directly or view it on GitHub: https://github.com/doctrine/phpcr-odm/issues/361#issuecomment-26522487
Sent from my Android device with K-9 Mail. Please excuse my brevity.
I think the so far we called all phpcr-odm specific commands doctrine:phpcr:... Which seems inconsistent with the rest of doctrine, but has the benefit of being consistent with the symfony bundle command names. Which imho is what counts more, as people will read library documentation and symfony cmf documentation. so i would be all for doctrine:phpcr:...
in #415 i add the helper to filter (for the proxy generation command). this is used by the orm to filter what documents should be generated.
to actually do this, we could either copy the generator from orm (and mongo and whatever), or we can check if there is potential for a common generator abstraction and see if we can move that to commons - the interest for that seems not that big: https://twitter.com/dbu/statuses/431716020915429376
Both the ORM and MongoDB ODM have a command which creates getters and setters, based on the mapping data. The PHPCR ODM should also provide something this command.
I'm in doubt what the command name should be. The ORM uses
orm:generate:entities
and the MongoDB ODM usesodm:generate:documents
. Some suggestions:odm:generate:documents
(duplicate, but it's the most logical)phpcr:generate:documents
(simple and descriptive, but sounds like it's something from phpcr/phpcr and not doctrine/phpcr-odm)phpcr-odm:generate:documents
(best option, but a very long command)For the last 2 suggestions, I would prefer to rename the MongoDB ODM command too.
I'll start working on this one, but I would like to discuss the best name.