Closed oriole9g closed 6 years ago
FWIW bundle works with Symfony 4 and even has a flex recipe
An specifically documentation for Symfony 4 like this http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/index.html could be an incredible help for new users.
However, it is very good to know that it's ready and that I only need to investigate how to make it work, thanks! :)
@oriole9g if you'd be willing to put together some instructions or insights and make a PR out of it, it'd be much appreciated! :)
Sure, I can write it something!
I can understand how it works when I do it in the old way creating a Controller that extends the Controller class, but when I use the Symfony 4 best practices extending from the AbstractController I do not undestand how inject the service, just type-hint an argument doesn't do the trick.
Auto-wiring support will be released with 3.5.0, for the time being you need to fall back to classic DI definition
I can confirm that using dev-master works the alias for auto-wiring, 3.5 will be a big deal :) I can write some documention and make a PR for 3.5.
Got a problem related to ODM installation.
I tried to install the master branch of the bundle, but it asks for ext-mongo ^1.6.7
Is it the mongo extension of the mongodb extension ?
this one : https://pecl.php.net/package/mongo
or this one : https://pecl.php.net/package/mongodb
ps : I'm developing on a windows, with PhpStorm and php 7.1 and I have to install them but I have no idea how to install ext on windows >.>
Edit : Found how to install mongodb.dll (mongo.dll didn't work, I have some message the dll is not available or something like that but nvm) and found the php7 text in the doctrine doc, so my problem is fixed. I lacked a bit of research before posting here, sorry for that.
@etshy: In the future, please open a new issue instead of replying to an existing, unrelated thread. For future reference, instructions for installing the mongodb
extension on Windows are found in the extension's PHP.net documentation. As you likely realized, the mongo
extension is deprecated and does not support PHP 7.
Yeah sorry, as my problem was related to the lack of documentation for symfony4 and this module I thought it would be good to not open new issue and use this one.
@etshy there's a note about PHP 7 by the end of Install the bundle with Composer
@robinkoikkara $em
sounds you'd be using ORM. Next if you don't have a bundle then using AppBundle:
doesn't sound right. Last you can call $dm->getRepository(SomeDocument::class)
and get the repository (given SomeDocument
is mapped).
@malarzm Thank you . Its my mistake. They clearly mentioned in their documentation " The AcmeStoreBundle:Product string is a shortcut you can use anywhere in Doctrine instead of the full class name of the document (i.e. Acme\StoreBundle\Document\Product). As long as your document lives under the Document namespace of your bundle, this will work."
@oriole9g did you make it work with symfony 4? can you share your experience? thanks
Closing here. This bundle works with Symfony 4, other issues (#462, #443) are tracked separately.
I have found documentation for Symfony 3 but absolutely nothing for Symfony 4.