doctrine / DoctrineMongoODMModule

Laminas Module for Doctrine MongoDB ODM
https://www.doctrine-project.org/projects/doctrine-mongo-odm-module.html
MIT License
83 stars 87 forks source link

Problem directory name #225

Closed sirpatrick2 closed 3 years ago

sirpatrick2 commented 3 years ago

The directory DoctrineMongoODMModule/view/laminas-deveoper-tools/toolbar/ has a typo. laminas-deveoper-tools has a missing 'l' should be: laminas-developer-tools

rieschl commented 3 years ago

This has been fixed in the latest PR.

sirpatrick2 commented 3 years ago

Ah ok, sorry I must have done something wrong as composer ~2.0 downloaded version 2.0.2 and I had this typo.

Man thanks. Patrick

Il 27 ottobre 2020 09:14:42 CET, Thomas Rieschl notifications@github.com ha scritto:

This has been fixed in the latest PR.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/doctrine/DoctrineMongoODMModule/issues/225#issuecomment-717067335

-- Inviato dal mio dispositivo Android con K-9 Mail. Perdonate la brevità.

rieschl commented 3 years ago

Well the latest tag is 3.0.0, so you have to manually update your composer.json file and perhaps change something in your code base, as the new version uses now mongodb-odm version 2.

sirpatrick2 commented 3 years ago

OK perfect, thanks

sirpatrick2 commented 3 years ago

I did install 3.0.0 and changed accordingly my code base.

Still got this error when constructing a form and passing the injected ObjectManager which was retrieved by $container->get('doctrine.documentmanager.odm_default')

Argument 1 passed to Arcfot\Form\SchedaEditForm::__construct() must be an instance of Doctrine\Common\Persistence\ObjectManager, instance of Doctrine\ODM\MongoDB\DocumentManager given […]

Is that an issue?

Many Thanks.

Patrick Invernizzi

Da: Thomas Rieschl notifications@github.com Inviato: martedì, 27. ottobre 2020 09:41 A: doctrine/DoctrineMongoODMModule DoctrineMongoODMModule@noreply.github.com Cc: Patrick sirpatrick2@gmx.ch; Manual manual@noreply.github.com Oggetto: Re: [doctrine/DoctrineMongoODMModule] Problem directory name (#225)

Well the latest tag is 3.0.0, so you have to manually update your composer.json file and perhaps change something in your code base, as the new version uses now mongodb-odm version 2.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/doctrine/DoctrineMongoODMModule/issues/225#issuecomment-717080875 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ6NI2YREFUEENPMRQN3H33SM2BRFANCNFSM4S7TTOVA . https://github.com/notifications/beacon/AQ6NI25UTWVWF4FWXGJTZKTSM2BRFA5CNFSM4S7TTOVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFK64SKY.gif

rieschl commented 3 years ago

That's not related to this package and neither to doctrine/mongodb-odm v2 but doctrine/persistence. Apparently, you installed doctrine/persistence v2 but didn't migrate your code.

Argument 1 passed to Arcfot\Form\SchedaEditForm::__construct() must be an instance of Doctrine\Common\Persistence\ObjectManager, instance of Doctrine\ODM\MongoDB\DocumentManager given […]

The namespace has changed to Doctrine\Persistence.

TL;DR: change the type hint of your SchedaEditForm from Doctrine\Common\Persistence\ObjectManager to \Doctrine\Persistence\ObjectManager.

sirpatrick2 commented 3 years ago

I still have persistence v1 but YES, that was exactly the \Common\ wrong!

I really didn’t see it!

Thomas, many thanks, you saved my night!

My compliments! Great!

Patrick

Da: Thomas Rieschl notifications@github.com Inviato: giovedì, 29. ottobre 2020 20:32 A: doctrine/DoctrineMongoODMModule DoctrineMongoODMModule@noreply.github.com Cc: Patrick sirpatrick2@gmx.ch; State change state_change@noreply.github.com Oggetto: Re: [doctrine/DoctrineMongoODMModule] Problem directory name (#225)

That's not related to this package and neither to doctrine/mongodb-odm v2 but doctrine/persistence. Apparently, you installed doctrine/persistence v2 but didn't migrate your code.

Argument 1 passed to Arcfot\Form\SchedaEditForm::__construct() must be an instance of Doctrine\Common\Persistence\ObjectManager, instance of Doctrine\ODM\MongoDB\DocumentManager given […]

The namespace has changed to https://github.com/doctrine/persistence/blob/3.0.x/UPGRADE-2.0.md#namespace-renamed-to-doctrinepersistence Doctrine\Persistence.

TL;DR: change the type hint of your SchedaEditForm from Doctrine\Common\Persistence\ObjectManager to \Doctrine\Persistence\ObjectManager.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/doctrine/DoctrineMongoODMModule/issues/225#issuecomment-718973563 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ6NI25TP6ILV7AE6STPN53SNG7JTANCNFSM4S7TTOVA . https://github.com/notifications/beacon/AQ6NI2ZW4A2OBLBFBOHXU73SNG7JTA5CNFSM4S7TTOVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFLNKU6Y.gif

rieschl commented 3 years ago

I still have persistence v1 but YES, that was exactly the \Common\ wrong! I really didn’t see it!

Out of curiosity, which version of doctrine/persistence are you using, exactly?

sirpatrick2 commented 3 years ago

I didn’t install it myself, was installed by composer dependencies…

In fact I am not sure which version it is, I don’t know how to check it.

Could be that is the 2.1.x so I was wrong.

The README in the directory says:

Doctrine Persistence

Build Status

Code Coverage

The Doctrine Persistence project is a library that provides common abstractions for object mapper persistence.

More resources:

Da: Thomas Rieschl notifications@github.com Inviato: giovedì, 29. ottobre 2020 21:21 A: doctrine/DoctrineMongoODMModule DoctrineMongoODMModule@noreply.github.com Cc: Patrick sirpatrick2@gmx.ch; State change state_change@noreply.github.com Oggetto: Re: [doctrine/DoctrineMongoODMModule] Problem directory name (#225)

I still have persistence v1 but YES, that was exactly the \Common\ wrong! I really didn’t see it!

Out of curiosity, which version of doctrine/persistence are you using, exactly?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/doctrine/DoctrineMongoODMModule/issues/225#issuecomment-718998778 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ6NI2ZVFAD6PR6DQE3TC2LSNHFD5ANCNFSM4S7TTOVA . https://github.com/notifications/beacon/AQ6NI25T5ZX6QKV3TSNKR7LSNHFD5A5CNFSM4S7TTOVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFLNQZ6Q.gif

rieschl commented 3 years ago

you can check it with composer info doctrine/persistence, there you can see the current version

sirpatrick2 commented 3 years ago

name : doctrine/persistence

versions : * 2.1.0

sorry, I was wrong…. But hey, really, thanks a lot, I learned something!

Da: Thomas Rieschl notifications@github.com Inviato: giovedì, 29. ottobre 2020 21:35 A: doctrine/DoctrineMongoODMModule DoctrineMongoODMModule@noreply.github.com Cc: Patrick sirpatrick2@gmx.ch; State change state_change@noreply.github.com Oggetto: Re: [doctrine/DoctrineMongoODMModule] Problem directory name (#225)

you can check it with composer info doctrine/persistence, there you can see the current version

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/doctrine/DoctrineMongoODMModule/issues/225#issuecomment-719005833 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ6NI2ZT7DTJEDF2UFXU6GDSNHGX5ANCNFSM4S7TTOVA . https://github.com/notifications/beacon/AQ6NI22TZLK5HSTZ4ZZZGHDSNHGX5A5CNFSM4S7TTOVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFLNSRCI.gif

sirpatrick2 commented 3 years ago

And BTW I managed to make all other changes, so the application runs without errors now!

I was upgrading my app from ZF3 to laminas so I also finally upgraded ODM to 3.0

Da: Thomas Rieschl notifications@github.com Inviato: giovedì, 29. ottobre 2020 21:35 A: doctrine/DoctrineMongoODMModule DoctrineMongoODMModule@noreply.github.com Cc: Patrick sirpatrick2@gmx.ch; State change state_change@noreply.github.com Oggetto: Re: [doctrine/DoctrineMongoODMModule] Problem directory name (#225)

you can check it with composer info doctrine/persistence, there you can see the current version

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/doctrine/DoctrineMongoODMModule/issues/225#issuecomment-719005833 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ6NI2ZT7DTJEDF2UFXU6GDSNHGX5ANCNFSM4S7TTOVA . https://github.com/notifications/beacon/AQ6NI22TZLK5HSTZ4ZZZGHDSNHGX5A5CNFSM4S7TTOVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFLNSRCI.gif

rieschl commented 3 years ago

And BTW I managed to make all other changes, so the application runs without errors now! I was upgrading my app from ZF3 to laminas so I also finally upgraded ODM to 3.0

Nice 👍

sirpatrick2 commented 3 years ago

Thanks a lot to you again, Thomas, and best salutations from Ticino, Southern Switzerland.

Patrick

Da: Thomas Rieschl notifications@github.com Inviato: giovedì, 29. ottobre 2020 22:02 A: doctrine/DoctrineMongoODMModule DoctrineMongoODMModule@noreply.github.com Cc: Patrick sirpatrick2@gmx.ch; State change state_change@noreply.github.com Oggetto: Re: [doctrine/DoctrineMongoODMModule] Problem directory name (#225)

And BTW I managed to make all other changes, so the application runs without errors now! I was upgrading my app from ZF3 to laminas so I also finally upgraded ODM to 3.0

Nice 👍

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/doctrine/DoctrineMongoODMModule/issues/225#issuecomment-719019665 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ6NI27UN4A7CPX7J6XLYTTSNHJ25ANCNFSM4S7TTOVA . https://github.com/notifications/beacon/AQ6NI23SSHL3UML2J7TR3H3SNHJ25A5CNFSM4S7TTOVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFLNV5EI.gif