diff --git a/CHANGELOG-1.1.md b/CHANGELOG-1.1.md index 09a3f04c..87d977a5 100644 --- a/CHANGELOG-1.1.md +++ b/CHANGELOG-1.1.md @@ -59,3 +59,81 @@ in 1.1.x patch versions. * [#148](https://github.com/doctrine/mongodb/pull/148): Reset cursor before and after `getSingleResult()` * [#149](https://github.com/doctrine/mongodb/pull/149): Use integer-casted argument in `Cursor::batchSize()` + +1.1.0 (2013-12-02) +------------------ + + * [#92](https://github.com/doctrine/mongodb/pull/92): Add get/setReadPreference() methods on core classes + * [#97](https://github.com/doctrine/mongodb/pull/97): Implement `Collection::aggregate()` helper + * [#103](https://github.com/doctrine/mongodb/pull/103): Support array argument in `Builder::select()` and `exclude()` + * [#105](https://github.com/doctrine/mongodb/pull/105): Internal cursor improvements for hint, sort, read preferences, and recreation + * `Cursor::hint()` and `sort()` should overwrite previous values + * Integrate `setReadPreference()` with `recreate()` and make it chainable + * [#106](https://github.com/doctrine/mongodb/pull/106): Events refactoring and support for modifying data in EventArgs + * Support MongoDB::createCollection() options array (driver 1.4+) + * Introduce MutableEventArgs object for post-event listeners + * [#107](https://github.com/doctrine/mongodb/pull/107): Adding $nor query operator for Builder and Expr + * [#118](https://github.com/doctrine/mongodb/pull/118): Documentation cleanup + * [#109](https://github.com/doctrine/mongodb/pull/109): Support GeoJSON and 2dsphere queries + * Rename `Query::TYPE_GEO_LOCATION` to `TYPE_GEO_NEAR` + * Query builder and expression methods for 2dsphere geo-spatial operators + * Integration with [GeoJSON](http://github.com/jmikola/geojson) library + * [#121](https://github.com/doctrine/mongodb/pull/121): Reorder methods alphabetically + * [#123](https://github.com/doctrine/mongodb/pull/123): ArrayIterator improvements + * Allow `offsetSet()` to append values + * Fix `valid()` return value if an array element is `false` + * [#124](https://github.com/doctrine/mongodb/pull/124): Deprecated passing scalar $query argument to `Collection::update()` + * [#122](https://github.com/doctrine/mongodb/pull/122): Command method refactoring + * Command methods now throw ResultException on error + * `group()` now returns an ArrayIterator instead of the raw command response + * Ensure all `mapReduce()` options are prepared as MongoCode objects (where applicable) + * Handle external database output strategy for `mapReduce()` + * [#126](https://github.com/doctrine/mongodb/pull/126): DBRef database/collection method improvements + * `createDBRef()` should not use array type hinting (arg can be a document or an ID) + * `createDBRef()` should not dispatch events, nor should it be logged + * Add event dispatching to `Database::getDBRef()` (Collection already had this) + * [#127](https://github.com/doctrine/mongodb/pull/127): Improve events/logging for Database methods + * Fixed post-event dispatching for `getGridFS()` and `createCollection()` + * Added tests for Database event dispatching + * Fixed logging for `createCollection()` and make LoggableDatabase's API consistent with the base class + * [#128](https://github.com/doctrine/mongodb/pull/128): Query builder improvements + * Do not filter out falsey values in Query/Builder `debug()` methods + * Support values and expressions for $pull in query builder + * Remove recursive merging in `Expr::addManyToSet()` + * Implement `Expr::each()` and allow it to be used with `addToSet()` + * Deprecate `Expr::addManyToSet()` in favor of `addToSet()` and `each()` + * Support $each/$slice/$sort operators with `push()` + * `Expr::push()` should ensure $each operator appears first + * `Expr::where()` should not alter the current field in the builder + * `Builder::mapReduceOptions()` and `out()` methods should require mapReduce command + * Support GeoJSON in `Builder::geoNear()` and set spherical default + * `Builder::map()` should init full query array, default to inline mapReduce output + * Rename `Query::DISTINCT_FIELD` to `DISTINCT` + * Throw exception for invalid query types in Query constructor + * Query should allow a single cursor hint to be specified + * Query should apply "limit" option for mapReduce commands + * Add array type-hint to `Builder::all()` and `Expr::all()` + * `Query::getIterator()` should not execute if an exception is guaranteed + * Deprecate `Query::iterate()` alias in favor of `getIterator()` + * [#130](https://github.com/doctrine/mongodb/pull/130): Add $rename update operator for Builder and Expr + * [#131](https://github.com/doctrine/mongodb/pull/131): Remove $cmd args/properties and deprecate `mongoCmd` option + * [#132](https://github.com/doctrine/mongodb/pull/132): Make full command result accessible in ArrayIterator + * [#140](https://github.com/doctrine/mongodb/pull/140): Add `initialize()` calls in Connection methods to avoid use of null objects + * [#139](https://github.com/doctrine/mongodb/pull/139): `Builder::sort()` should default to ascending order + * [#143](https://github.com/doctrine/mongodb/pull/143): Query builder read prefs and wrap driver classes directly + * Wrap driver classes directly and remove Connection reinit logic + * Convert inconsistent return values for `getReadPreference()` from pre-1.3.3 drivers + * Don't throw InvalidArgumentException in `Cursor::setReadPreference()` + * Support read preferences in Query Builder + * [#147](https://github.com/doctrine/mongodb/pull/147): `Expr::mod()` should take explicit divisor/remainder args + +Additional commits included in 1.1.0: + + * [d51a44d](https://github.com/doctrine/mongodb/commit/d51a44d): Support $elemMatch in query projections (closes [#101](https://github.com/doctrine/mongodb/pull/101)) + * [e92f0f2](https://github.com/doctrine/mongodb/commit/e92f0f2): Remove unused $options argument in `Expr::equals()` + * [773423a](https://github.com/doctrine/mongodb/commit/773423a): Use driver's return value in `Collection::batchInsert()` (closes [#93](https://github.com/doctrine/mongodb/pull/93)) + * [114a0ae](https://github.com/doctrine/mongodb/commit/114a0ae): Fix cursor creation when MapReduce's db output option is used + * [8bc1466](https://github.com/doctrine/mongodb/commit/8bc1466): Ensure `Cursor::limit()` argument is casted to an integer + * [6afee47](https://github.com/doctrine/mongodb/commit/6afee47): Deprecate `Connection::getStatus()` (to be removed in 1.2) + * [05258d4](https://github.com/doctrine/mongodb/commit/05258d4): Deprecate Database force/prev/resetError() methods (to be removed in 1.2) + * [25a8025](https://github.com/doctrine/mongodb/commit/25a8025): Restore `Query::TYPE_GEO_LOCATION` constant for BC, but deprecate it diff --git a/CHANGELOG-1.2.md b/CHANGELOG-1.2.md index b7aea071..59c72438 100644 --- a/CHANGELOG-1.2.md +++ b/CHANGELOG-1.2.md @@ -15,3 +15,41 @@ in 1.2.x patch versions. * [#229](https://github.com/doctrine/mongodb/pull/229): Fix EagerCursor::skip() method calling limit method of base cursor instead of skip method * [#231](https://github.com/doctrine/mongodb/pull/231): Remove count method declaration in CursorInterface to fix fatal error for PHP 5.3 * [#237](https://github.com/doctrine/mongodb/pull/237): Fix bug where timeout is set to 1 ms + +1.2.0 (2015-08-18) +------------------ + + * [#171](https://github.com/doctrine/mongodb/pull/171): Implement `$minDistance` query operator and geoNear option + * Adds `minDistance()` method to query builder + * [#183](https://github.com/doctrine/mongodb/pull/183): Rewrite `Collection::update()` "multi" option to "multiple" + * [#184](https://github.com/doctrine/mongodb/pull/184): Query builder support for $text operator in MongoDB 2.6 + * Adds `language()`, `text()`, `selectMeta()`, and `sortMeta()` methods to query builder + * [#186](https://github.com/doctrine/mongodb/pull/186): Fixed `Connection::convertWriteTimeout()` docs + * [#192](https://github.com/doctrine/mongodb/pull/192): Support `$meta` expressions in `Cursor::sort()` + * This is typically used for sorting by text search scores + * [#197](https://github.com/doctrine/mongodb/pull/197): Support aggregation command cursors and client options + * Introduces a CommandCursor class, which decorates a MongoCommandCursor + * Command cursors require driver 1.5+ + * Socket timeouts for command cursors require driver 1.6+ + * [#201](https://github.com/doctrine/mongodb/pull/201): Fix issue when an operator follows `equals()` + * [#203](https://github.com/doctrine/mongodb/pull/203): Ensure Query projection option is renamed for findAndModify + * [#205](https://github.com/doctrine/mongodb/pull/205): Don't pass empty arrays to array_combine() + * [#209](https://github.com/doctrine/mongodb/pull/209): Add a common cursor interface + * The Cursor and EagerCursor classes implement this interface + * [#212](https://github.com/doctrine/mongodb/pull/212): Query builder support for new update operators in MongoDB 2.6 + * Adds `bitAnd()`, `bitOr()`, `bitXor()`, `currentDate()`, `max()`, `min()`, and `mul()` methods to query builder + * [#213](https://github.com/doctrine/mongodb/pull/213): Add aggregation builder + * The builder may be created with `Collection::createAggregationBuilder()` + * Top-level builder methods correspond to pipeline operators + * [#214](https://github.com/doctrine/mongodb/pull/214): Removes parameter type hint from `Builder::geoWithin()` + * Now accepts an array or `GeoJson\Geometry\Geometry` instance + * [#215](https://github.com/doctrine/mongodb/pull/215): Add test environment preferring lowest package dependencies + * [#222](https://github.com/doctrine/mongodb/pull/222): Add support for `MongoCollection::parallelCollectionScan()` + * [#223](https://github.com/doctrine/mongodb/pull/223): Support `$useKeys` option when EagerCursor converts to an array + * [#224](https://github.com/doctrine/mongodb/pull/224): Support client and socket timeout options in `Collection::count()` + * `Collection::count()` now supports an options array as its second argument (`$limit` integer is still supported) + * Socket timeout (i.e. `socketTimeoutMS`) may be specified alongside command options + * [#225](https://github.com/doctrine/mongodb/pull/225): Include all cursor methods in cursor interface + * Expands the common CursorInterface to support all methods in Cursor and EagerCursor + * Allows ODM to be more agnostic when decorating a Cursor or EagerCursor + * [#226](https://github.com/doctrine/mongodb/pull/226): Implement getter for cursor `useIdentifierKeys` option diff --git a/CHANGELOG-1.3.md b/CHANGELOG-1.3.md index 91c4e54e..18d4d0f3 100644 --- a/CHANGELOG-1.3.md +++ b/CHANGELOG-1.3.md @@ -4,5 +4,27 @@ CHANGELOG for 1.3.x This changelog references the relevant changes (bug and security fixes) done in 1.3.x patch versions. -1.3.1 (????-??-??) +1.3.0 (2016-03-19) ------------------ + + * [#227](https://github.com/doctrine/mongodb/pull/227): Specify time limit operation on a mongodb cursor + * Adds `maxTimeMS()` method to query builder and cursor + * [#233](https://github.com/doctrine/mongodb/pull/233): Allow Event Listeners the ability to modify context information in the event + * Allows changes to the options for the following events: preAggregate, preBatchInsert, preDistinct, preFind, preFindAndRemove, preFindAndUpdate, preFindOne, preGetDBRef, preGroup, preInsert, preMapReduce, preNear, preRemove, postRemove, preSave, preUpdate, postUpdate + * [#234](https://github.com/doctrine/mongodb/pull/234): Add support for `$comment` operator + * Adds `comment()` method to query builder + * [#235](https://github.com/doctrine/mongodb/pull/235): Add support for `$setOnInsert` operator + * Adds `setOnInsert()` method to query builder + * [#238](https://github.com/doctrine/mongodb/pull/238): Bump PHP and mongo version requirements + * [#240](https://github.com/doctrine/mongodb/pull/240): Add new MongoDB 3.2 features to aggregation builder + * Adds `sample()`, `indexStats()` and `lookup()` methods to aggregation builder + * Adds `avg()`, `max()`, `min()`, `stdDevPop()`, `stdDevSamp()`, `sum()` methods to project stage + * Adds `minDistance()` method to geoNear stage + * Adds `includeArrayIndex()` and `preserveNullAndEmptyArrays()` methods to unwind stage + * [#241](https://github.com/doctrine/mongodb/pull/241): Add query operators introduced with MongoDB 3.2 + * Adds `bitsAllClear()`, `bitsAllSet()`, `bitsAnyClear()`, `bitsAnySet()`, `caseSensitive()`, `diacriticSensitive()` methods to query builder + * [#251](https://github.com/doctrine/mongodb/pull/251): Corrected fluent interface docblocks + * [#255](https://github.com/doctrine/mongodb/pull/255): Add expr method to aggregation expression object + * Adds `expr()` method to the aggregation Expr class + * [#256](https://github.com/doctrine/mongodb/pull/256): Allow using operators in group stages + * Adds all methods from the `Operator` class to the group stage diff --git a/CHANGELOG-1.4.md b/CHANGELOG-1.4.md new file mode 100644 index 00000000..58067dc0 --- /dev/null +++ b/CHANGELOG-1.4.md @@ -0,0 +1,21 @@ +CHANGELOG for 1.4.x +=================== + +This changelog references the relevant changes (bug and security fixes) done +in 1.4.x patch versions. + +1.4.0 (2016-11-22) +------------------ + + * [#244](https://github.com/doctrine/mongodb/pull/244): Use short array syntax + * [#263](https://github.com/doctrine/mongodb/pull/263): Fix wrong parameter in count method + * [#264](https://github.com/doctrine/mongodb/pull/264): Drop support for PHP 5.5 + * [#273](https://github.com/doctrine/mongodb/pull/273): Remove unused use statements + * [#274](https://github.com/doctrine/mongodb/pull/274): Loggable GridFS collection + * [#275](https://github.com/doctrine/mongodb/pull/275): Deprecate update() and multiple() methods in query builder + * [#246](https://github.com/doctrine/mongodb/pull/246): Open up aggregation builder API for use in ODM + * [#278](https://github.com/doctrine/mongodb/pull/278): Run travis tests against MongoDB 3.2 and 2.6 + * [#276](https://github.com/doctrine/mongodb/pull/276): Support passing driver options to connection class + * [#277](https://github.com/doctrine/mongodb/pull/277): Pass query options when running count command + * [#280](https://github.com/doctrine/mongodb/pull/280): Use argument unpacking insteda of call_user_func + * [#279](https://github.com/doctrine/mongodb/pull/279): Allow passing multiple arguments to add* methods diff --git a/UPGRADE-1.1.md b/UPGRADE-1.1.md deleted file mode 100644 index 364b4ac8..00000000 --- a/UPGRADE-1.1.md +++ /dev/null @@ -1,79 +0,0 @@ -UPGRADE from 1.0 to 1.1 -======================= - -Pull requests completed for the 1.1.0 release: - - * [#92](https://github.com/doctrine/mongodb/pull/92): Add get/setReadPreference() methods on core classes - * [#97](https://github.com/doctrine/mongodb/pull/97): Implement `Collection::aggregate()` helper - * [#103](https://github.com/doctrine/mongodb/pull/103): Support array argument in `Builder::select()` and `exclude()` - * [#105](https://github.com/doctrine/mongodb/pull/105): Internal cursor improvements for hint, sort, read preferences, and recreation - * `Cursor::hint()` and `sort()` should overwrite previous values - * Integrate `setReadPreference()` with `recreate()` and make it chainable - * [#106](https://github.com/doctrine/mongodb/pull/106): Events refactoring and support for modifying data in EventArgs - * Support MongoDB::createCollection() options array (driver 1.4+) - * Introduce MutableEventArgs object for post-event listeners - * [#107](https://github.com/doctrine/mongodb/pull/107): Adding $nor query operator for Builder and Expr - * [#118](https://github.com/doctrine/mongodb/pull/118): Documentation cleanup - * [#109](https://github.com/doctrine/mongodb/pull/109): Support GeoJSON and 2dsphere queries - * Rename `Query::TYPE_GEO_LOCATION` to `TYPE_GEO_NEAR` - * Query builder and expression methods for 2dsphere geo-spatial operators - * Integration with [GeoJSON](http://github.com/jmikola/geojson) library - * [#121](https://github.com/doctrine/mongodb/pull/121): Reorder methods alphabetically - * [#123](https://github.com/doctrine/mongodb/pull/123): ArrayIterator improvements - * Allow `offsetSet()` to append values - * Fix `valid()` return value if an array element is `false` - * [#124](https://github.com/doctrine/mongodb/pull/124): Deprecated passing scalar $query argument to `Collection::update()` - * [#122](https://github.com/doctrine/mongodb/pull/122): Command method refactoring - * Command methods now throw ResultException on error - * `group()` now returns an ArrayIterator instead of the raw command response - * Ensure all `mapReduce()` options are prepared as MongoCode objects (where applicable) - * Handle external database output strategy for `mapReduce()` - * [#126](https://github.com/doctrine/mongodb/pull/126): DBRef database/collection method improvements - * `createDBRef()` should not use array type hinting (arg can be a document or an ID) - * `createDBRef()` should not dispatch events, nor should it be logged - * Add event dispatching to `Database::getDBRef()` (Collection already had this) - * [#127](https://github.com/doctrine/mongodb/pull/127): Improve events/logging for Database methods - * Fixed post-event dispatching for `getGridFS()` and `createCollection()` - * Added tests for Database event dispatching - * Fixed logging for `createCollection()` and make LoggableDatabase's API consistent with the base class - * [#128](https://github.com/doctrine/mongodb/pull/128): Query builder improvements - * Do not filter out falsey values in Query/Builder `debug()` methods - * Support values and expressions for $pull in query builder - * Remove recursive merging in `Expr::addManyToSet()` - * Implement `Expr::each()` and allow it to be used with `addToSet()` - * Deprecate `Expr::addManyToSet()` in favor of `addToSet()` and `each()` - * Support $each/$slice/$sort operators with `push()` - * `Expr::push()` should ensure $each operator appears first - * `Expr::where()` should not alter the current field in the builder - * `Builder::mapReduceOptions()` and `out()` methods should require mapReduce command - * Support GeoJSON in `Builder::geoNear()` and set spherical default - * `Builder::map()` should init full query array, default to inline mapReduce output - * Rename `Query::DISTINCT_FIELD` to `DISTINCT` - * Throw exception for invalid query types in Query constructor - * Query should allow a single cursor hint to be specified - * Query should apply "limit" option for mapReduce commands - * Add array type-hint to `Builder::all()` and `Expr::all()` - * `Query::getIterator()` should not execute if an exception is guaranteed - * Deprecate `Query::iterate()` alias in favor of `getIterator()` - * [#130](https://github.com/doctrine/mongodb/pull/130): Add $rename update operator for Builder and Expr - * [#131](https://github.com/doctrine/mongodb/pull/131): Remove $cmd args/properties and deprecate `mongoCmd` option - * [#132](https://github.com/doctrine/mongodb/pull/132): Make full command result accessible in ArrayIterator - * [#140](https://github.com/doctrine/mongodb/pull/140): Add `initialize()` calls in Connection methods to avoid use of null objects - * [#139](https://github.com/doctrine/mongodb/pull/139): `Builder::sort()` should default to ascending order - * [#143](https://github.com/doctrine/mongodb/pull/143): Query builder read prefs and wrap driver classes directly - * Wrap driver classes directly and remove Connection reinit logic - * Convert inconsistent return values for `getReadPreference()` from pre-1.3.3 drivers - * Don't throw InvalidArgumentException in `Cursor::setReadPreference()` - * Support read preferences in Query Builder - * [#147](https://github.com/doctrine/mongodb/pull/147): `Expr::mod()` should take explicit divisor/remainder args - -Additional commits included in 1.1.0: - - * [d51a44d](https://github.com/doctrine/mongodb/commit/d51a44d): Support $elemMatch in query projections (closes [#101](https://github.com/doctrine/mongodb/pull/101)) - * [e92f0f2](https://github.com/doctrine/mongodb/commit/e92f0f2): Remove unused $options argument in `Expr::equals()` - * [773423a](https://github.com/doctrine/mongodb/commit/773423a): Use driver's return value in `Collection::batchInsert()` (closes [#93](https://github.com/doctrine/mongodb/pull/93)) - * [114a0ae](https://github.com/doctrine/mongodb/commit/114a0ae): Fix cursor creation when MapReduce's db output option is used - * [8bc1466](https://github.com/doctrine/mongodb/commit/8bc1466): Ensure `Cursor::limit()` argument is casted to an integer - * [6afee47](https://github.com/doctrine/mongodb/commit/6afee47): Deprecate `Connection::getStatus()` (to be removed in 1.2) - * [05258d4](https://github.com/doctrine/mongodb/commit/05258d4): Deprecate Database force/prev/resetError() methods (to be removed in 1.2) - * [25a8025](https://github.com/doctrine/mongodb/commit/25a8025): Restore `Query::TYPE_GEO_LOCATION` constant for BC, but deprecate it diff --git a/UPGRADE-1.2.md b/UPGRADE-1.2.md deleted file mode 100644 index 5035a81c..00000000 --- a/UPGRADE-1.2.md +++ /dev/null @@ -1,39 +0,0 @@ -UPGRADE from 1.1 to 1.2 -======================= - -Pull requests completed for the 1.2.0 release: - - * [#171](https://github.com/doctrine/mongodb/pull/171): Implement `$minDistance` query operator and geoNear option - * Adds `minDistance()` method to query builder - * [#183](https://github.com/doctrine/mongodb/pull/183): Rewrite `Collection::update()` "multi" option to "multiple" - * [#184](https://github.com/doctrine/mongodb/pull/184): Query builder support for $text operator in MongoDB 2.6 - * Adds `language()`, `text()`, `selectMeta()`, and `sortMeta()` methods to query builder - * [#186](https://github.com/doctrine/mongodb/pull/186): Fixed `Connection::convertWriteTimeout()` docs - * [#192](https://github.com/doctrine/mongodb/pull/192): Support `$meta` expressions in `Cursor::sort()` - * This is typically used for sorting by text search scores - * [#197](https://github.com/doctrine/mongodb/pull/197): Support aggregation command cursors and client options - * Introduces a CommandCursor class, which decorates a MongoCommandCursor - * Command cursors require driver 1.5+ - * Socket timeouts for command cursors require driver 1.6+ - * [#201](https://github.com/doctrine/mongodb/pull/201): Fix issue when an operator follows `equals()` - * [#203](https://github.com/doctrine/mongodb/pull/203): Ensure Query projection option is renamed for findAndModify - * [#205](https://github.com/doctrine/mongodb/pull/205): Don't pass empty arrays to array_combine() - * [#209](https://github.com/doctrine/mongodb/pull/209): Add a common cursor interface - * The Cursor and EagerCursor classes implement this interface - * [#212](https://github.com/doctrine/mongodb/pull/212): Query builder support for new update operators in MongoDB 2.6 - * Adds `bitAnd()`, `bitOr()`, `bitXor()`, `currentDate()`, `max()`, `min()`, and `mul()` methods to query builder - * [#213](https://github.com/doctrine/mongodb/pull/213): Add aggregation builder - * The builder may be created with `Collection::createAggregationBuilder()` - * Top-level builder methods correspond to pipeline operators - * [#214](https://github.com/doctrine/mongodb/pull/214): Removes parameter type hint from `Builder::geoWithin()` - * Now accepts an array or `GeoJson\Geometry\Geometry` instance - * [#215](https://github.com/doctrine/mongodb/pull/215): Add test environment preferring lowest package dependencies - * [#222](https://github.com/doctrine/mongodb/pull/222): Add support for `MongoCollection::parallelCollectionScan()` - * [#223](https://github.com/doctrine/mongodb/pull/223): Support `$useKeys` option when EagerCursor converts to an array - * [#224](https://github.com/doctrine/mongodb/pull/224): Support client and socket timeout options in `Collection::count()` - * `Collection::count()` now supports an options array as its second argument (`$limit` integer is still supported) - * Socket timeout (i.e. `socketTimeoutMS`) may be specified alongside command options - * [#225](https://github.com/doctrine/mongodb/pull/225): Include all cursor methods in cursor interface - * Expands the common CursorInterface to support all methods in Cursor and EagerCursor - * Allows ODM to be more agnostic when decorating a Cursor or EagerCursor - * [#226](https://github.com/doctrine/mongodb/pull/226): Implement getter for cursor `useIdentifierKeys` option diff --git a/UPGRADE-1.3.md b/UPGRADE-1.3.md deleted file mode 100644 index aaaaea96..00000000 --- a/UPGRADE-1.3.md +++ /dev/null @@ -1,26 +0,0 @@ -UPGRADE from 1.2 to 1.3 -======================= - -Pull requests completed for the 1.3.0 release: - - * [#227](https://github.com/doctrine/mongodb/pull/227): Specify time limit operation on a mongodb cursor - * Adds `maxTimeMS()` method to query builder and cursor - * [#233](https://github.com/doctrine/mongodb/pull/233): Allow Event Listeners the ability to modify context information in the event - * Allows changes to the options for the following events: preAggregate, preBatchInsert, preDistinct, preFind, preFindAndRemove, preFindAndUpdate, preFindOne, preGetDBRef, preGroup, preInsert, preMapReduce, preNear, preRemove, postRemove, preSave, preUpdate, postUpdate - * [#234](https://github.com/doctrine/mongodb/pull/234): Add support for `$comment` operator - * Adds `comment()` method to query builder - * [#235](https://github.com/doctrine/mongodb/pull/235): Add support for `$setOnInsert` operator - * Adds `setOnInsert()` method to query builder - * [#238](https://github.com/doctrine/mongodb/pull/238): Bump PHP and mongo version requirements - * [#240](https://github.com/doctrine/mongodb/pull/240): Add new MongoDB 3.2 features to aggregation builder - * Adds `sample()`, `indexStats()` and `lookup()` methods to aggregation builder - * Adds `avg()`, `max()`, `min()`, `stdDevPop()`, `stdDevSamp()`, `sum()` methods to project stage - * Adds `minDistance()` method to geoNear stage - * Adds `includeArrayIndex()` and `preserveNullAndEmptyArrays()` methods to unwind stage - * [#241](https://github.com/doctrine/mongodb/pull/241): Add query operators introduced with MongoDB 3.2 - * Adds `bitsAllClear()`, `bitsAllSet()`, `bitsAnyClear()`, `bitsAnySet()`, `caseSensitive()`, `diacriticSensitive()` methods to query builder - * [#251](https://github.com/doctrine/mongodb/pull/251): Corrected fluent interface docblocks - * [#255](https://github.com/doctrine/mongodb/pull/255): Add expr method to aggregation expression object - * Adds `expr()` method to the aggregation Expr class - * [#256](https://github.com/doctrine/mongodb/pull/256): Allow using operators in group stages - * Adds all methods from the `Operator` class to the group stage diff --git a/UPGRADE-1.4.md b/UPGRADE-1.4.md new file mode 100644 index 00000000..a55f4dbd --- /dev/null +++ b/UPGRADE-1.4.md @@ -0,0 +1,49 @@ +Upgrade from 1.3 to 1.4 +======================= + +PHP version support +------------------- + + * Support for PHP 5.5 has been dropped as it has reached its end of life. + * PHP 7 and PHP 7.1 are supported using [mongo-php-adapter](https://github.com/alcaeus/mongo-php-adapter). + +Query builder +------------- + + * The `update()` and `multiple()` methods have been deprecated. Use `updateOne` + or `updateMany` instead. + * The `addAnd()`, `addNor()` and `addOr()` methods now accept multiple parameters. + Before: + ```php + $builder + ->addAnd($someExpression) + ->addAnd($otherExpression); + ``` + + After: + ```php + $builder->addAnd($someExpression, $otherExpression); + ``` + +Aggregation builder +------------------- + + * The `addAnd()` and `addOr()` methods now accept multiple parameters. + +Connection +---------- + + * Passing driver options to the connection class is now supported. You can pass + a stream context as shown in the PHP documentation: + ```php + $context = stream_context_create([ + 'mongodb' => [ + 'log_cmd_insert' => function () { + // Logic goes here... + } + ], + 'ssl' => [ + 'allow_self_signed' => false, + ] + ]); + $connection = new \Doctrine\MongoDB\Connection(null, [], null, null, ['context' => $context]);