Open Keko94 opened 7 years ago
It should be possible, as I did write the bundle with the expectation to use other data sources. Use the model interfaces, and then register your entities in the app config.
Doctrine Ticket Entity Example
Then to register your class: https://github.com/hackzilla/TicketBundleDemoApp/blob/master/app/config/config.yml#L80
If you have any problems, then let mw know, and I'll have a better look.
Let me know if it works, as I haven't had anyone use a different data source (that I know of).
I can't success, I think the problem is from the entity manager. The bundle works only with an ORM. https://github.com/hackzilla/TicketBundle/blob/develop/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php
The service "hackzilla_ticket.ticket_manager" has a dependency on a non-existent service "doctrine.orm.entity_manager", one of my errors that I got.
Then do you think it's always possible to not use doctrine/orm, but an odb I'm using FOSUserBundle with mongodb, my users work.
Thanks
Thank you for bringing this to my attention. I had hoped that it was compatible, but I had forgotten about dependency.
This makes more sense if I deal with #109
At least now I have an example setup to work with (FOSUserBundle and mongodb)
Related to #47
Can I ask what version of Symfony and PHP you are using?
Sure, I use Symfony 3.1 with PHP 5.6 Thank you for your investigation, I really need this feature, if I can help you, tell me !
Le 11 juin 2017 à 13:51, Daniel Platt notifications@github.com<mailto:notifications@github.com> a écrit :
Can I ask what version of Symfony and PHP you are using?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/hackzilla/TicketBundle/issues/110#issuecomment-307624331, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGpB85wTDnLU3e0bRno_Qq5mSbBI7AN_ks5sC9S8gaJpZM4N1mMi.
Any news ? Maybe there is something interesting here: http://symfony.com/doc/current/doctrine/mapping_model_classes.html
I apologise for the lack of feedback. I am still working on #109, as I noticed there were a couple of dependancies that needed removing.
I am still working on it.
I just successed to make it work with mongodb. But... I did it fastly then it doesn't work anymore with orm, but it's not hard to make it work with both ! If I have time i will do it and i'll submit a pull request ;)
If you link me to the mongodb version, then I'm sure I can combine them. Personally, I don't have any experience with mongodb, so it will help.
I've just pushed an alpha version #109.
The plan is to create a ODM version of this. https://github.com/hackzilla/TicketBundle/blob/develop/Manager/StorageManager/DoctrineOrmStorageManager.php
I think I've got it mostly working.
You'll have to use the develop branch for the moment, as its still not quite finished.
"hackzilla/ticket-bundle": "dev-develop",
If you need an example of how got it setup then checkout https://github.com/hackzilla/TicketBundleDemoApp/tree/feature/mongodb
At the moment, I can't get past this error in Mongo.
app/console fos:user:crea admin
[Doctrine\Common\Persistence\Mapping\MappingException]
The class 'AppBundle\Entity\User' was not found in the chain configured namespaces FOS\UserBundle\Model
@Keko94, are you still interested in this feature? If yes, I'd like to know if could you bring some testing for this. I'm working on #129, where I think the support for Doctrine ODM could be added.
Thank you.
How can I use this bundle with MongoDB ?