Skip to content

Commit

Permalink
Merge branch '1.0.x'
Browse files Browse the repository at this point in the history
* 1.0.x:
  Update installation instructions
  • Loading branch information
alcaeus committed Dec 18, 2016
2 parents 4e03ae0 + 57bbf53 commit 584c55e
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions README.md
Expand Up @@ -30,26 +30,12 @@ root:

$ composer require alcaeus/mongo-php-adapter

This package declares that it provides `ext-mongo`; Composer only allows this
replacement to apply if `composer.json` or a dependency contain a requirement,
see [composer/composer#2690](https://github.com/composer/composer/issues/2690).
If your project already has a dependency on `ext-mongo`, the command above may
not work. This is due to a bug in composer, see [composer/composer#5030](https://github.com/composer/composer/issues/5030).

Therefore, you either need to have a dependency on a package which requires
`ext-mongo`, such as `doctrine/mongodb`, in your project:

"require": {
"php": "^7.0",
"alcaeus/mongo-php-adapter": "^1.0.0",
"doctrine/mongodb": "dev-master"
}

or you need to explicitly require `ext-mongo` yourself in `composer.json`:

"require": {
"php": "^7.0",
"alcaeus/mongo-php-adapter": "^1.0.0",
"ext-mongo": "*"
}
To fix this, you can use the `--ignore-platform-reqs` switch when running the
above command, or when running `composer update` with no `composer.lock` file
present.

# Known issues

Expand All @@ -61,6 +47,13 @@ counterparts in `ext-mongo`. Do not rely on exception messages being the same.
Methods that return a result array containing a `connectionId` field will always
return `0` as connection ID.

## Errors

All errors and warnings triggered by `ext-mongo` are triggered as `E_USER_WARNING`
and `E_USER_ERROR` because `trigger_error` doesn't accept the `E_WARNING` and
`E_USER` codes. If you rely on these error codes in your error handling routines,
please update your code accordingly.

## Serialization of objects
Serialization of any Mongo* objects (e.g. MongoGridFSFile, MongoCursor, etc.)
will not work properly. The objects can be serialized but are not usable after
Expand Down

0 comments on commit 584c55e

Please sign in to comment.