Releases: mongodb/mongo-php-library
1.0.2
The PHP team is happy to announce that version 1.0.2 of our MongoDB PHP library is now available. This library is a high-level abstraction for the PHP 5, PHP 7, and HHVM drivers (i.e. mongodb
extension).
Release Highlights
This maintenance release includes a bug fix pertaining to the handling of options for the Find operation.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=16629
Documentation
Documentation for this library may be found at:
http://mongodb.github.io/mongo-php-library/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require "mongodb/mongodb=^1.0.0"
Installation instructions for the PHP and HHVM driver may be found in the PHP.net documentation.
Thanks
Thanks for our community contributors for this release:
1.0.1
The PHP team is happy to announce that version 1.0.1 of our MongoDB PHP library is now available. This library is a high-level abstraction for the PHP 5, PHP 7, and HHVM drivers (i.e. mongodb
extension).
Release Highlights
This maintenance release includes two bugs fixes pertaining to the handling of options for the Find and Aggregate operations.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=16537
Documentation
Documentation for this library may be found at:
http://mongodb.github.io/mongo-php-library/
Generated API reference for this library may be found at:
http://mongodb.github.io/mongo-php-library/api/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require "mongodb/mongodb=^1.0.0"
Installation instructions for the PHP and HHVM driver may be found in the PHP.net documentation.
Thanks
Thanks for our community contributors for 1.0.1:
1.0.0
The PHP team is happy to announce that version 1.0.0 of our MongoDB PHP library is now available. This library is a high-level abstraction for the PHP 5, PHP 7, and HHVM drivers (i.e. mongodb
extension).
Release Highlights
This library provides Client, Database, and Collection classes, each of which contains helper methods for their context. For instance, the Client class may be constructed with a MongoDB connection URI and serve as the gateway for selecting Database and Collection classes; the Database class may be used to create and drop collections or execute arbitrary commands; the Collection class contains a suite of CRUD operations and index management methods. These classes are analogous to the MongoClient, MongoDB, and MongoCollection classes found in the legacy mongo
extension; however, the APIs are not identical.
This library implements the following MongoDB cross-driver specifications:
Starting with version 1.0.0 of the library, BSON documents and arrays are unserialized as MongoDB\Model\BSONDocument
and MongoDB\Model\BSONArray
classes by default (this may be customized via the typeMap
option on any of the core classes). These model classes implement the MongoDB\BSON\Serializable
and MongoDB\BSON\Unserializable
interfaces found in the new driver, which the library uses to ensure that each class is properly serialized back to its original BSON type. This eliminates a caveat of the legacy driver where BSON arrays might turn into objects, and vice versa. Additionally, the new model classes extend PHP's ArrayObject
class for usability (e.g. documents and arrays support element access via []
and the document class may also use ->
).
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=15987
Documentation
Documentation for this library may be found at:
http://mongodb.github.io/mongo-php-library/
Generated API reference for this library may be found at:
http://mongodb.github.io/mongo-php-library/api/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require "mongodb/mongodb=^1.0.0"
The MongoDB PHP driver may be installed or upgraded with:
pecl install mongodb
pecl upgrade mongodb
Installation Instructions for the HHVM driver may be found in the PHP.net documentation.
1.0.0-beta2
The PHP team is happy to announce that version 1.0.0-beta2 of our MongoDB PHP library, which abstracts our PHP and HHVM extensions, is now available. This release adds support for new features in MongoDB 3.2 and introduces a new option to control BSON unserialization throughout the library.
Release Highlights
The core Database and Collection classes are now constructed with options arrays instead of nullable WriteConcern and ReadPreference parameters. The new typeMap
and readConcern
options may now be passed in via these arrays. Additionally, both classes now have a withOptions()
method to allow users to create a cloned instance with different options (e.g. changing the default read preference for a Collection).
A new Database::command()
method was added to allow users to execute arbitrary database commands for which the library may not already provide a helper.
The new typeMap
option, which was introduced to the Client, Database, and Collection classes, allows users to provide a default type map to be applied to cursors returned by the library. This option is inherited from parent contexts (i.e. a Client's type map will be inherited by selected Database and Collection objects). Users looking to emulate the legacy driver's behavior of returning both BSON documents and arrays as PHP arrays may use the following type map:
$client = new MongoDB\Client($uri, [], ['typeMap' => ['root' => 'array', 'document' => 'array']]);
The above behavior is not recommended due to ambiguities between associative and numerically indexed PHP arrays, which is why we abandoned this legacy behavior in the new driver. For our upcoming 1.0.0 stable release, we hope to provide user-friendly classes for BSON documents and arrays to use in the library's default type map. These classes will implement PHP's ArrayAccess interface (addressing concerns some users have working with stdClass instances) while still ensuring that documents and arrays are correctly serialized to BSON (using object-casting and array_values()
, respectively). Progress for that task is being tracked in PHPLIB-74.
This release also has several internal improvements for compatibility with version 1.1.1 of the PHP "mongodb" extension, which added support for PHP 7.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=16400
Documentation
Documentation for this library (and its API) may be found at:
http://mongodb.github.io/mongo-php-library/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require "mongodb/mongodb=^1.0.0@beta"
The MongoDB PHP driver may be installed or upgraded with:
pecl install mongodb
Installation Instructions for the HHVM driver may be found in that project's README.
Thanks
Thanks for our community contributors for this release:
1.0.0-beta1
The PHP team is happy to announce that version 1.0.0-beta1 of our MongoDB PHP library, which abstracts our PHP and HHVM extensions, is now available.
Release Highlights
This release has several internal improvements for compatibility with versions 1.0.0 and 1.0.0RC1 of the PHP and HHVM "mongodb" extensions (i.e. drivers), respectively.
Additionally, the findOne()
method now accepts a typeMap
option to allow more control over how the returned document is unserialized from BSON (as was already possible with find()
by calling MongoDB\Driver\Cursor::setTypeMap()
).
A complete list of resolved issues in this release may be found at:
https://github.com/mongodb/mongo-php-library/blob/master/RELEASE-1.0
Documentation
Documentation for this library (and its API) may be found at:
http://mongodb.github.io/mongo-php-library/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require "mongodb/mongodb=^1.0.0@beta"
The MongoDB PHP driver may be installed or upgraded with:
pecl install mongodb
Installation Instructions for the HHVM driver may be found in that project's README.
1.0.0-alpha1
The PHP team is happy to announce that version 1.0.0-alpha1 of our MongoDB PHP library, which abstracts our PHP and HHVM extensions, is now available.
Release Highlights
This release has several internal improvements for compatibility with versions 1.0.0-beta2 and 1.0.0-alpha1 of the PHP and HHVM "mongodb" extensions (i.e. drivers), respectively. Additionally, many of the database and collection methods have been refactored to use self-contained operation classes.
A complete list of resolved issues in this release may be found at:
https://github.com/mongodb/mongo-php-library/blob/master/RELEASE-1.0
Documentation
Documentation for this library (and its API) may be found at:
http://mongodb.github.io/mongo-php-library/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require "mongodb/mongodb=^1.0.0@alpha"
The MongoDB PHP driver may be installed or upgraded with:
pecl install mongodb-beta
Installation Instructions for the HHVM driver may be found in that project's README.
MongoDB PHP Library 0.2.0 released
This is the second alpha release for the MongoDB PHP library. This release introduces Client and Database classes and adds full support for the CRUD and collection/index management specifications. Additionally, the library should be compatible with all versions of MongoDB going back to 2.4. The library's dependency on the MongoDB PHP driver (i.e. extension) has also been bumped to 0.6.
This library may be installed or upgraded with:
composer require "mongodb/mongodb=^0.2.0"
The MongoDB PHP driver may be installed or upgraded with:
pecl install mongodb-alpha
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?version=14845&projectId=12483
Documentation for this library (and its API) may be found at:
http://10gen-labs.github.io/mongo-php-library-prototype/
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Woot! Initial PHongo library released !
This is the initial release of PHongo CRUD (being renamed to PHongo Library).
PHongo CRUD is an CRUD API ontop of Phongo. Its purpose is to provide standard MongoDB API and follows the MongoDB CRUD API Specification[1] that all MongoDB supported drivers follow.
PHongo CRUD provides several convenience methods that abstract the core PHongo extension. The methods include functionality to insert a single document, counting all documents in an collection, and delete documents from a collection.
Checkout the initial documentations at: http://bjori.github.io/phongo-crud/
And API docs at: http://bjori.github.io/phongo-crud/api/class-MongoDB.Collection.html
Let us know what you think!
[1] The specification has not been published yet - it is still a Work In Progress