0

I have problem with configuration MongoDB Symfony Program doesnt see class \MongoDbBudle\ to I went to Tools -> Composer -> add -> "doctrine/mongodb-odm". I tried to install it but I saw error:

C:\wamp64\bin\php\php7.0.10\php.exe C:\Users\Root\PhpstormProjects\untitled2\composer.phar require doctrine/mongodb-odm:1.2.x-dev -n --no-progress
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Removal request for alcaeus/mongo-php-adapter == 1.1.9999999.9999999-dev
- Removal request for alcaeus/mongo-php-adapter == 9999999-dev
- doctrine/mongodb-odm 1.2.x-dev requires doctrine/mongodb ^1.4.0 -> satisfiable by doctrine/mongodb[1.4.0].
- doctrine/mongodb 1.4.0 requires ext-mongo ^1.5 -> satisfiable by alcaeus/mongo-php-adapter[1.1.x-dev, dev-master].
- Installation request for doctrine/mongodb-odm 1.2.x-dev -> satisfiable by doctrine/mongodb-odm[1.2.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- C:\wamp64\bin\php\php7.0.10\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Installation failed, reverting ./composer.json to its original content.

php.ini seems to be ok. I added dynamic extension mongo-dll: http://pastebin.com/bfb34A0s

Please help me how to solve this problem.

3
  • Hi user6949283, and welcome to Stack Overflow. Can I make a comment? Your question is quite difficult to understand, because it's quite difficult to read. Could you re-edit your question to improve the layout? The help guide to markdown formatting might be useful to you. Commented Mar 22, 2017 at 11:16
  • Can you please show the output of composer show -p? Commented Mar 22, 2017 at 14:24
  • thanks for help, it works :) Commented Mar 24, 2017 at 18:17

1 Answer 1

1

Using ODM with PHP 7 is a bit trickier than it should, please check if adding

"provide": {
    "ext-mongo": "1.6.14"
}

to your project's composer.json would solve the issue. Otherwise you can see full chapter on how to use ODM with PHP 7 in the official documentation

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.