<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Changelog</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.mongogridfsexception.html">MongoGridFSException</a></div> <div class="next" style="text-align: right; float: right;"><a href="book.msql.html">mSQL</a></div> <div class="up"><a href="book.mongo.html">Mongo</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="changelog.mongo" class="appendix"> <h1>Changelog</h1> <p class="para">The following changes have been made to classes/functions/methods of this extension.</p> <div class="simplesect"> <h3 class="title">MongoDB PHP Driver 1.3.0</h3> <p class="para"> The 1.3 series introduced several major changes to the extension such as completely rewritten <a href="mongo.connecting.html" class="link">connection handling</a> (and removal of the pooling mechanism), support for <a href="mongo.readpreferences.html" class="link">ReadPreferences</a> and change the default <a href="mongo.writes.html" class="link">WriteConcerns</a> to be <em class="emphasis">acknowledged</em> by introducing a new class <a href="class.mongoclient.html" class="link">MongoClient</a> which serves as a replacement class for the now deprecated <a href="class.mongo.html" class="classname">Mongo</a> class. </p> <p class="para"> The driver now also supports connecting to multiple mongos instances (the Mongo Shard router) for loadbalancing. </p> <p class="para"> Other enhancements include improved logging for easier connection handling debugging with <a href="class.mongolog.html" class="classname">MongoLog</a> and support for the <a href="http://docs.mongodb.org/manual/core/aggregation-pipeline/" class="link external">» Aggregation Framework</a> via the <span class="methodname"><a href="mongocollection.aggregate.html" class="methodname">MongoCollection::aggregate()</a></span> method. </p> </div> <div class="simplesect"> <h3 class="title">Changes to existing methods</h3> <p class="para"> Following is a list of all improvements to existing methods since their inception. </p> <table class='doctable table' rules='groups'><thead><tr><th>Version</th><th>Function</th><th>Description</th></tr></thead><tbody class="gen-changelog v"><tr><td>1.4.5</td><td><a href='mongocursor.batchsize.html'>MongoCursor::batchSize</a></td><td>Before 1.4.5, this method would throw an MongoCursorException if the cursor had already started iterating.</td></tr></tbody><tbody class="gen-changelog v1-4-5"><tr><td>1.4.0</td><td><a href='mongoclient.construct.html'>MongoClient::__construct</a></td><td>Added the "wTimeoutMS" option has replacement for "wTimeout".</td></tr><tr><td> </td><td><a href='mongocursor.hint.html'>MongoCursor::hint</a></td><td>The index argument now supports index names as string values. In versions before 1.4.0, only array or object values were accepted.</td></tr><tr><td> </td><td><a href='mongocursor.setflag.html'>MongoCursor::setFlag</a></td><td>Support for flag 3 (OPLOG_REPLAY) is added. Versions before 1.4.0 would throw a warning saying that the flag is unsupported.</td></tr><tr><td> </td><td><a href='mongodb.createcollection.html'>MongoDB::createCollection</a></td><td>In versions before 1.4.0, the options were all arguments to the method. The function synopsis in those older versions is: public MongoCollectionMongoDB::createCollection stringname boolcappedFALSE intsize0 intmax0 The meaning of the options is the same as described under the options argument above.</td></tr></tbody><tbody class="gen-changelog v1-4-0"><tr><td>1.3.4</td><td><a href='mongoclient.construct.html'>MongoClient::__construct</a></td><td>Added the "connectTimeoutMS" and "socketTimeoutMS" options.</td></tr></tbody><tbody class="gen-changelog v1-3-4"><tr><td>1.3.3</td><td><a href='mongoclient.getreadpreference.html'>MongoClient::getReadPreference</a></td><td>The return value has changed to be consistent with MongoClient::setReadPreference. The type value was changed from a number to a string, type_string was removed, and tagsets now expresses tags as key/value pairs instead of colon-delimited strings.</td></tr><tr><td> </td><td><a href='mongocollection.getreadpreference.html'>MongoCollection::getReadPreference</a></td><td>The return value has changed to be consistent with MongoCollection::setReadPreference. The type value was changed from a number to a string, type_string was removed, and tagsets now expresses tags as key/value pairs instead of colon-delimited strings.</td></tr><tr><td> </td><td><a href='mongodb.getreadpreference.html'>MongoDB::getReadPreference</a></td><td>The return value has changed to be consistent with MongoDB::setReadPreference. The type value was changed from a number to a string, type_string was removed, and tagsets now expresses tags as key/value pairs instead of colon-delimited strings.</td></tr></tbody><tbody class="gen-changelog v1-3-3"><tr><td>1.3.0</td><td><a href='mongoclient.close.html'>MongoClient::close</a></td><td>The connection parameter to this function was added in 1.3.0. Before that, only the write connection would be closed by this method.</td></tr><tr><td> </td><td><a href='mongoclient.construct.html'>MongoClient::__construct</a></td><td>Added the "readPreference", "readPreferenceTags", "w" and "wTimeout" options.</td></tr><tr><td> </td><td><a href='mongocollection.ensureindex.html'>MongoCollection::ensureIndex</a></td><td>The options parameter no longer accepts a boolean to signify a unique index. Instead, this now has to be done with array('unique' => true).</td></tr><tr><td> </td><td><a href='mongocollection.insert.html'>MongoCollection::insert</a></td><td>The options parameter no longer accepts a boolean to signify a acknowledged write. Instead, this now has to be done with array('w' => 1) (The default behaviour of MongoClient).</td></tr><tr><td> </td><td><a href='mongocollection.remove.html'>MongoCollection::remove</a></td><td>The options parameter no longer accepts a boolean to signify "justOne". Instead, this now has to be done with array('justOne' => true).</td></tr><tr><td> </td><td><a href='mongocollection.update.html'>MongoCollection::update</a></td><td>The options parameter no longer accepts a boolean to signify an upsert. Instead, this now has to be done with array('upsert' => true).</td></tr><tr><td> </td><td><a href='mongodb.listcollections.html'>MongoDB::listCollections</a></td><td>Added the includeSystemCollections parameter.</td></tr><tr><td> </td><td><a href='mongogridfscursor.key.html'>MongoGridFSCursor::key</a></td><td>The document's _id is returned as a string value, since the key should be unique. Pre-1.3.0, filename was returned.</td></tr></tbody><tbody class="gen-changelog v1-3-0"><tr><td>1.2.11</td><td><a href='mongo.getpoolsize.html'>Mongo::getPoolSize</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongo.getslave.html'>Mongo::getSlave</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongo.getslaveokay.html'>Mongo::getSlaveOkay</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongo.pooldebug.html'>Mongo::poolDebug</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongo.setslaveokay.html'>Mongo::setSlaveOkay</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongo.switchslave.html'>Mongo::switchSlave</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongobindata.construct.html'>MongoBinData::__construct</a></td><td>Emits E_DEPRECATED when the second argument is not used. The default value for type may change in the near future.</td></tr><tr><td> </td><td><a href='mongocollection.ensureindex.html'>MongoCollection::ensureIndex</a></td><td>Emits E_DEPRECATED when options is scalar.</td></tr><tr><td> </td><td><a href='mongocollection.getslaveokay.html'>MongoCollection::getSlaveOkay</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongocollection.group.html'>MongoCollection::group</a></td><td>Emits E_DEPRECATED when options is scalar.</td></tr><tr><td> </td><td><a href='mongocollection.remove.html'>MongoCollection::remove</a></td><td>Emits E_DEPRECATED when options is scalar.</td></tr><tr><td> </td><td><a href='mongocollection.setslaveokay.html'>MongoCollection::setSlaveOkay</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongocollection.update.html'>MongoCollection::update</a></td><td>Emits E_DEPRECATED when options is scalar.</td></tr><tr><td> </td><td><a href='mongocursor.doquery.html'>MongoCursor::doQuery</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongodb.authenticate.html'>MongoDB::authenticate</a></td><td>Emits E_DEPRECATED when used. Please pass in the authentication details to the constructor.</td></tr><tr><td> </td><td><a href='mongodb.forceerror.html'>MongoDB::forceError</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongodb.getslaveokay.html'>MongoDB::getSlaveOkay</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongodb.preverror.html'>MongoDB::prevError</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongodb.reseterror.html'>MongoDB::resetError</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongodb.setslaveokay.html'>MongoDB::setSlaveOkay</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongopool.getsize.html'>MongoPool::getSize</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongopool.info.html'>MongoPool::info</a></td><td>Emits E_DEPRECATED when used.</td></tr><tr><td> </td><td><a href='mongopool.setsize.html'>MongoPool::setSize</a></td><td>Emits E_DEPRECATED when used.</td></tr></tbody><tbody class="gen-changelog v1-2-11"><tr><td>1.2.10</td><td><a href='mongoclient.gethosts.html'>MongoClient::getHosts</a></td><td>Support for non-replicasets was added. The returned array elements now also include the hostname and port.</td></tr></tbody><tbody class="gen-changelog v1-2-10"><tr><td>1.2.7</td><td><a href='mongocollection.batchinsert.html'>MongoCollection::batchInsert</a></td><td>Added "continueOnError" option.</td></tr></tbody><tbody class="gen-changelog v1-2-7"><tr><td>1.2.5</td><td><a href='mongogridfs.storeupload.html'>MongoGridFS::storeUpload</a></td><td>Changed second parameter to an array of metadata. Pre-1.2.5, the second parameter was an optional string overriding the filename.</td></tr></tbody><tbody class="gen-changelog v1-2-5"><tr><td>1.2.0</td><td><a href='mongoclient.close.html'>MongoClient::close</a></td><td>Before version 1.2.0 the driver would not use persistent connections by default, and all connections would be closed as soon as a MongoDB connection went out if scope. Since version 1.2.0 this is no longer the case and it is a bad idea to call close as you might end up overloading the server with connections under high load.</td></tr><tr><td> </td><td><a href='mongoclient.construct.html'>MongoClient::__construct</a></td><td>Added the "username" and "password" options. Removed the "persist" option, as all connections are now persistent. It can still be used, but it doesn't affect anything. "persist" If the connection should be persistent. If set, the connection will be persistent. The string representation of the value is used as an ID for the connection, so two instances of MongoClient that are initialized with array("persist" => "foobar") will share the same database connection, whereas an instance initialized with array("persist" => "barbaz") will use a different database connection. The "replicaSet" option now takes a string, not a boolean.</td></tr><tr><td> </td><td><a href='mongocollection.ensureindex.html'>MongoCollection::ensureIndex</a></td><td>Added "timeout" option.</td></tr><tr><td> </td><td><a href='mongocollection.insert.html'>MongoCollection::insert</a></td><td>Added "timeout" option.</td></tr><tr><td> </td><td><a href='mongocollection.remove.html'>MongoCollection::remove</a></td><td>Added "timeout" option.</td></tr><tr><td> </td><td><a href='mongocollection.save.html'>MongoCollection::save</a></td><td>Added "timeout" option.</td></tr><tr><td> </td><td><a href='mongocollection.update.html'>MongoCollection::update</a></td><td>Added "timeout" option.</td></tr><tr><td> </td><td><a href='mongodb.command.html'>MongoDB::command</a></td><td>Added options parameter with a single option: "timeout".</td></tr></tbody><tbody class="gen-changelog v1-2-0"><tr><td>1.1.0</td><td><a href='mongocursor.info.html'>MongoCursor::info</a></td><td>Added a number of other fields, including id (the cursor id), at (the driver's counter of which document is current), numReturned (the number returned by the server in the current batch), and server (which server the query was sent to—useful in conjunction with .</td></tr></tbody><tbody class="gen-changelog v1-1-0"><tr><td>1.0.11</td><td><a href='mongocollection.ensureindex.html'>MongoCollection::ensureIndex</a></td><td>The "safe" option will trigger a primary failover, if necessary. MongoException will be thrown if the index name (either generated or set) is longer than 128 bytes.</td></tr><tr><td> </td><td><a href='mongocollection.insert.html'>MongoCollection::insert</a></td><td>Disconnects on "not master" errors if "safe" is set.</td></tr><tr><td> </td><td><a href='mongocollection.remove.html'>MongoCollection::remove</a></td><td>Disconnects on "not master" errors if "safe" is set.</td></tr><tr><td> </td><td><a href='mongocollection.save.html'>MongoCollection::save</a></td><td>Disconnects on "not master" errors if "safe" is set.</td></tr><tr><td> </td><td><a href='mongocollection.update.html'>MongoCollection::update</a></td><td>Disconnects on "not master" errors if "safe" is set.</td></tr></tbody><tbody class="gen-changelog v1-0-11"><tr><td>1.0.10</td><td><a href='mongocursor.info.html'>MongoCursor::info</a></td><td>Added started_iterating field, a boolean indicating if cursor is pre- or post-query.</td></tr></tbody><tbody class="gen-changelog v1-0-10"><tr><td>1.0.9</td><td><a href='mongoclient.construct.html'>MongoClient::__construct</a></td><td>Added the "replicaSet" option.</td></tr><tr><td> </td><td><a href='mongocollection.batchinsert.html'>MongoCollection::batchInsert</a></td><td>Added ability to pass integers to the "safe" option, which previously only accepted booleans. Added "fsync" option.</td></tr><tr><td> </td><td><a href='mongocollection.insert.html'>MongoCollection::insert</a></td><td>Added ability to pass integers to the "safe" option, which previously only accepted booleans. Added "fsync" option. The return type was changed to be an array containing error information if the "safe" option is used. Otherwise, a boolean is returned as before.</td></tr><tr><td> </td><td><a href='mongocollection.remove.html'>MongoCollection::remove</a></td><td>Added ability to pass integers to the "safe" option, which previously only accepted booleans. Added "fsync" option. The return type was changed to be an array containing error information if the "safe" option is used. Otherwise, a boolean is returned as before.</td></tr><tr><td> </td><td><a href='mongocollection.save.html'>MongoCollection::save</a></td><td>Added ability to pass integers to the "safe" option, which previously only accepted booleans. Added "fsync" option.</td></tr><tr><td> </td><td><a href='mongocollection.update.html'>MongoCollection::update</a></td><td>Added ability to pass integers to the "safe" option, which previously only accepted booleans. Added "fsync" option. The return type was changed to be an array containing error information if the "safe" option is used. Otherwise, a boolean is returned as before.</td></tr></tbody><tbody class="gen-changelog v1-0-9"><tr><td>1.0.7</td><td><a href='mongocollection.count.html'>MongoCollection::count</a></td><td>Added limit and skip parameters.</td></tr></tbody><tbody class="gen-changelog v1-0-7"><tr><td>1.0.5</td><td><a href='mongocollection.batchinsert.html'>MongoCollection::batchInsert</a></td><td>Added options parameter.</td></tr><tr><td> </td><td><a href='mongocollection.ensureindex.html'>MongoCollection::ensureIndex</a></td><td>Added the "name" option to override index name creation.</td></tr><tr><td> </td><td><a href='mongocollection.insert.html'>MongoCollection::insert</a></td><td>Changed second parameter to be an array of options. Pre-1.0.5, the second parameter was a boolean indicating the "safe" option.</td></tr><tr><td> </td><td><a href='mongocollection.remove.html'>MongoCollection::remove</a></td><td>Changed second parameter to be an array of options. Pre-1.0.5, the second parameter was a boolean indicating the "safe" option.</td></tr><tr><td> </td><td><a href='mongocollection.save.html'>MongoCollection::save</a></td><td>Added options parameter.</td></tr><tr><td> </td><td><a href='mongocollection.update.html'>MongoCollection::update</a></td><td>Added "safe" option.</td></tr></tbody><tbody class="gen-changelog v1-0-5"><tr><td>1.0.2</td><td><a href='mongoclient.construct.html'>MongoClient::__construct</a></td><td>Changed constructor to take an array of options. Pre-1.0.2, the constructor took the following parameters: server The server name. connect Optional boolean parameter specifying if the constructor should connect to the database before returning. Defaults to TRUE. persistent If the connection should be persistent. paired If the connection should be paired.</td></tr><tr><td> </td><td><a href='mongocollection.ensureindex.html'>MongoCollection::ensureIndex</a></td><td>Changed options parameter from boolean to array. Pre-1.0.2, the second parameter was an optional boolean value specifying a unique index.</td></tr></tbody><tbody class="gen-changelog v1-0-2"><tr><td>1.0.1</td><td><a href='mongocollection.insert.html'>MongoCollection::insert</a></td><td>Throw a MongoCursorException if the "safe" option is set and the insert fails.</td></tr><tr><td> </td><td><a href='mongocollection.update.html'>MongoCollection::update</a></td><td>Changed options parameter from boolean to array. Pre-1.0.1, the second parameter was an optional boolean value specifying an upsert.</td></tr></tbody></table> </div> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.mongogridfsexception.html">MongoGridFSException</a></div> <div class="next" style="text-align: right; float: right;"><a href="book.msql.html">mSQL</a></div> <div class="up"><a href="book.mongo.html">Mongo</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>