1

Symfony3 で新しいプロジェクトを作成します (symfony での最初のプロジェクトです)。Windows xampp (php バージョン 5.6) を使用します。composer と mongodb.dll ファイルをダウンロードします。それを xampp (php.ini) の拡張機能に追加します。composer.json に tho を追加します。

"doctrine/mongodb-odm": "~1.0",
"doctrine/mongodb-odm-bundle": "~3.0"

今、私は自分のcmdに行き、このcomendをコピーします

  php composer.phar update doctrine/mongodb-odm doctrine/mongodb-odm-bundle

そして、私はエラーがあります:

C:\xampp\htdocs\cannabis>php composer.phar update doctrine/mongodb-odm  doctrine/mongodb-odm-bundle
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
- doctrine/mongodb-odm 1.0.0-BETA6 requires doctrine/mongodb >=1.0.0-beta1,<1.1-dev -> satisfiable by doctrine/mongodb[1.0.0, 1.0.1, 1.0.10, 1.0.11, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9].
- doctrine/mongodb-odm 1.0.0-BETA7 requires doctrine/mongodb 1.0.* -> satisfiable by doctrine/mongodb[1.0.0, 1.0.1, 1.0.10, 1.0.11, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9].
- doctrine/mongodb-odm 1.0.0-BETA8 requires doctrine/mongodb 1.0.* -> satisfiable by doctrine/mongodb[1.0.0, 1.0.1, 1.0.10, 1.0.11, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9].
- doctrine/mongodb-odm 1.0.0-BETA9 requires doctrine/mongodb 1.0.* -> satisfiable by doctrine/mongodb[1.0.0, 1.0.1, 1.0.10, 1.0.11, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9].
- doctrine/mongodb-odm 1.0.0-BETA10 requires doctrine/mongodb >=1.1.5,<2.0 -> satisfiable by doctrine/mongodb[1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.0-BETA11 requires doctrine/mongodb >=1.1.5,<2.0 -> satisfiable by doctrine/mongodb[1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.0-BETA12 requires doctrine/mongodb >=1.1.5,<2.0 -> satisfiable by doctrine/mongodb[1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.0-BETA13 requires doctrine/mongodb >=1.1.5,<2.0 -> satisfiable by doctrine/mongodb[1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.0 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.1 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.2 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.3 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.4 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.5 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.6 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.7 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.8 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb 1.0.9 requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.8 requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.7 requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.6 requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.5 requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.4 requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.3 requires ext-mongo >=1.2.12,<1.5-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.2 requires ext-mongo >=1.2.12,<1.4-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.11 requires ext-mongo >=1.2.12,<1.7-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.10 requires ext-mongo >=1.2.12,<1.7-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.1 requires ext-mongo >=1.2.12,<1.4-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.0 requires ext-mongo >=1.2.12,<1.4-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb-odm 1.0.0-BETA5 requires doctrine/mongodb 1.0.0-BETA1 -> satisfiable by doctrine/mongodb[1.0.0-BETA1] but these conflict with your requirements or minimum-stability.
- doctrine/mongodb-odm 1.0.0-BETA4 requires doctrine/mongodb 1.0.0-BETA1 -> satisfiable by doctrine/mongodb[1.0.0-BETA1] but these conflict with your requirements or minimum-stability.
- doctrine/mongodb 1.1.8 requires ext-mongo >=1.2.12,<1.7-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.1.7 requires ext-mongo >=1.2.12,<1.7-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.1.6 requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.1.5 requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.3.0 requires ext-mongo ^1.5 -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.2.2 requires ext-mongo ^1.2.12 -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.2.1 requires ext-mongo ^1.2.12 -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.2.0 requires ext-mongo ^1.2.12 -> the requested PHP extension mongo is missing from your system.
- Installation request for doctrine/mongodb-odm 1.0.*@beta -> satisfiable by doctrine/mongodb-odm[1.0.0, 1.0.0-BETA10, 1.0.0-BETA11, 1.0.0-BETA12, 1.0.0-BETA13, 1.0.0-BETA4, 1.0.0-BETA5, 1.0.0-BETA6, 1.0.0-BETA7, 1.0.0-BETA8, 1.0.0-BETA9, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8].

To enable extensions, verify that they are enabled in those .ini files:
- C:\xampp\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
4

1 に答える 1

1

Doctrine ODM は現在、最新の php_mongodb 拡張機能をサポートしていません。代わりに、php_mongo (末尾に db がないことに注意してください) 拡張機能を使用する必要があります。

または、Doctrine ODM で php_mongodb を使用するには、最初に最新の dev-master を使用するようにアップグレードします。

"doctrine/mongodb-odm": "dev-master",
"doctrine/mongodb-odm-bundle": "dev-master"

次に、https://github.com/alcaeus/mongo-php-adapterを使用します

于 2016-10-20T06:35:47.053 に答える