Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mongodb Laravel Package

doctrine/mongodb

Doctrine MongoDB library for PHP, providing an object-oriented API for working with MongoDB. Includes database and collection abstractions, query and command builders, and tools for common CRUD operations—ideal as a low-level MongoDB foundation for PHP apps.

View on GitHub
Deep Wiki
Context7
1.6.4

1.6.4

  • Total issues resolved: 0
  • Total pull requests resolved: 1
  • Total contributors: 1

bug

1.6.3

We are happy to announce the immediate availability of Doctrine MongoDB Abstraction Layer 1.6.3.

Bug fixes in this release

This release fixes a bug with the popFirst and popLast methods in Expr which causes the wrong elements to be removed.

A full list of issues and pull requests included in this release may be found in the 1.6.3 milestone.

PHP version support

This library requires PHP 5.6 or newer. If you are using PHP 7.0 or newer, you can use this library by adding a polyfill for ext-mongo, like mongo-php-adapter.

1.6.2

We are happy to announce the immediate availability of Doctrine MongoDB Abstraction Layer 1.6.2.

Bug fixes in this release

This release fixes a bug when uploading GridFS files when the read preference on the collection has been set to secondary or secondaryPreferred.

A full list of issues and pull requests included in this release may be found in the 1.6.2 milestone.

PHP version support

This library requires PHP 5.6 or newer. If you are using PHP 7.0 or newer, you can use this library by adding a polyfill for ext-mongo, like mongo-php-adapter.

1.6.1

We are happy to announce the immediate availability of Doctrine MongoDB Abstraction Layer 1.6.1.

Bug fixes in this release

This release fixes a bug with empty $match stages in aggregation builder and fixes the generated pipeline stage for $bucketAuto aggregation pipeline stages.

A full list of issues and pull requests included in this release may be found in the 1.6.1 milestone.

PHP version support

This library requires PHP 5.6 or newer. If you are using PHP 7.0 or newer, you can use this library by adding a polyfill for ext-mongo, like mongo-php-adapter.

1.6.0

We are happy to announce the immediate availability of Doctrine MongoDB Abstraction Layer 1.6.0.

Bug fixes in this release

This release fixes a BC break introduced in 1.5.0 which prevented correct conversion of expression object within aggregation builder stages.

A full list of issues and pull requests included in this release may be found in the 1.6.0 milestone.

PHP version support

This library requires PHP 5.6 or newer. If you are using PHP 7.0 or newer, you can use this library by adding a polyfill for ext-mongo, like mongo-php-adapter.

1.5.0

We are happy to announce the immediate availability of Doctrine MongoDB Abstraction Layer 1.5.0.

Release highlights

Aggregation builder

This release adds support for aggregation pipeline changes introduced in MongoDB. Details can be found in the changelog.

Bug fixes in this release

Notable fixes may be found in the changelog. A full list of issues and pull requests included in this release may be found in the 1.5.0 milestone.

PHP version support

This library requires PHP 5.6 or newer. If you are using PHP 7.0 or 7.1, you can use this library by adding a polyfill for ext-mongo, like mongo-php-adapter.

1.4.0

We are happy to announce the immediate availability of Doctrine MongoDB Abstraction Layer 1.4.0.

Release highlights

Passing context options to the driver

With this release it's possible to pass driver options to the connection class, which will then be passed on to the MongoDB driver. For example, to pass a stream context with SSL context options, you could use the following code snippet:

    $context = stream_context_create([
        'ssl' => [
            'allow_self_signed' => false,
        ]
    ]);
    $connection = new \Doctrine\MongoDB\Connection(null, [], null, null, ['context' => $context]);

Passing multiple expressions to logical operators

The addAnd, addNor and addOr methods in the query and aggregation builders now take multiple expression objects. Instead of having to call the method repeatedly, you may call it once with multiple arguments:

    // Before
    $builder
        ->addAnd($someExpression)
        ->addAnd($otherExpression);

    // After
    $builder->addAnd($someExpression, $otherExpression);

Deprecations

The update and multiple methods in the query have been deprecated in favor of updateOne and updateMany. These deprecations help people using ODM prepare for the next version of ODM which will utilize the new MongoDB library API.

Bug fixes in this release

Notable fixes may be found in the changelog. A full list of issues and pull requests included in this release may be found in the 1.4.0 milestone.

PHP version support

With this release, we have dropped support for PHP 5.5. Users using PHP 5.5 or older are encouraged to upgrade to a newer PHP version. If you are using PHP 7.0 or 7.1, you can use this library by adding a polyfill for ext-mongo, like mongo-php-adapter.

1.3.0

This release drops compatibility with PHP 5.3 and PHP 5.4 and requires ext-mongo >= 1.5. Older driver versions are no longer supported.

Pull requests completed for the 1.3.0 release:

  • #227: Specify time limit operation on a mongodb cursor
  • #233: Allow Event Listeners the ability to modify context information in the event preFindAndRemove, preFindAndUpdate, preFindOne, preGetDBRef, preGroup, preInsert, preMapReduce, preNear, preRemove, postRemove, preSave, preUpdate, postUpdate
  • #234: Add support for $comment operator
  • #235: Add support for $setOnInsert operator
  • #238: Bump PHP and mongo version requirements
  • #240: Add new MongoDB 3.2 features to aggregation builder
  • #241: Add query operators introduced with MongoDB 3.2 query builder
  • #251: Corrected fluent interface docblocks
  • #255: Add expr method to aggregation expression object
  • #256: Allow using operators in group stages
1.2.2

Pull requests completed for the 1.2.2 release:

  • #250: Fix wrong syntax for dateToString operator
1.2.1

Pull requests completed for the 1.2.1 release:

  • #229: Fix EagerCursor::skip() method calling limit method of base cursor instead of skip method
  • #231: Remove count method declaration in CursorInterface to fix fatal error for PHP 5.3
  • #237: Fix bug where timeout is set to 1 ms
1.2.0

Pull requests completed for the 1.2.0 release:

  • #171: Implement $minDistance query operator and geoNear option
  • #183: Rewrite Collection::update() "multi" option to "multiple"
  • #184: Query builder support for $text operator in MongoDB 2.6
  • #186: Fixed Connection::convertWriteTimeout() docs
  • #192: Support $meta expressions in Cursor::sort()
  • #197: Support aggregation command cursors and client options
  • #201: Fix issue when an operator follows equals()
  • #203: Ensure Query projection option is renamed for findAndModify
  • #205: Don't pass empty arrays to array_combine()
  • #209: Add a common cursor interface
  • #212: Query builder support for new update operators in MongoDB 2.6
  • #213: Add aggregation builder
  • #214: Removes parameter type hint from Builder::geoWithin()
  • #215: Add test environment preferring lowest package dependencies
  • #222: Add support for MongoCollection::parallelCollectionScan()
  • #223: Support $useKeys option when EagerCursor converts to an array
  • #224: Support client and socket timeout options in Collection::count()
  • #225: Include all cursor methods in cursor interface
  • #226: Implement getter for cursor useIdentifierKeys option
1.1.7

Note: This tag was previously created against the master branch (1.2.x), which means it contained new commits that did not belong in 1.1.x. It has since been revised to point to the correct commit within the 1.1.x branch and is now consistent with the changelog below. That said, this release has been superseded by 1.1.8.


Pull requests completed for the 1.1.7 release:

  • #188: Added last stable mongo extension version to travis build matrix
  • #193: Do not allow PHP 5.6 test failures
  • #195: Fix Connection::isConnected() for driver versions 1.5.0+
  • #196: Fix handling of client options (e.g. socket timeout) in command helpers
  • #198: Convert deprecated "timeout" option for Database::command()
  • #199: Remove "timeout" conversion from Collection command wrappers
1.1.8

Pull requests completed for the 1.1.8 release:

  • #207: Bump doctrine/common dependency
1.0.11

Pull requests completed for the 1.0.11 release:

  • #207: Bump doctrine/common dependency
1.0.10

Pull requests completed for the 1.0.10 release:

  • #188: Added last stable mongo extension version to travis build matrix
  • #193: Do not allow PHP 5.6 test failures
  • #195: Fix Connection::isConnected() for driver versions 1.5.0+
1.1.6

Pull requests completed for the 1.1.6 release:

  • #172: Collection::ensureIndex() should convert write options
  • #174: MongoDB 2.6: Ensure $in argument is a real BSON array
  • #175: Convert timeout options for driver >= 1.5.0
  • #176: Add new PHP and driver versions to Travis CI
  • #177: Respect $options when $server is null in Connection constructor
  • #178: Convert deprecated MongoClient constructor options for driver >= 1.4.0
  • #179: Cast createCollection() options for MongoDB 2.6 compatibility
1.0.9

Pull requests completed for the 1.0.9 release:

  • #172: Collection::ensureIndex() should convert write options
  • #176: Add new PHP and driver versions to Travis CI
  • #177: Respect $options when $server is null in Connection constructor
1.1.5

Pull requests completed for the 1.1.5 release:

  • #166: Use current() in EagerCursor::getSingleResult()
  • #167: Revert "Fix Query construction in EagerCursor preparation test"
1.0.8

Pull requests completed for the 1.0.8 release:

  • #166: Use current() in EagerCursor::getSingleResult()
1.1.4

Pull requests completed for the 1.1.4 release:

  • #163: Revert "Allow string or array Cursor::hint() argument"
  • #164: Allow string or array Cursor::hint() argument

Note: PR #163 was necessary for the 1.0.7 release, due to a BC break in 1.0.6. It shows up here because the 1.0.x branch was merged to master. PR #164 is the reverted change reapplied to the master branch.

1.0.7

Pull requests completed for the 1.0.7 release:

  • #163: Revert "Allow string or array Cursor::hint() argument"
1.1.3

Pull requests completed for the 1.1.3 release:

  • #157: Fix createCollection event dispatching
  • #159: Allow string or array Cursor::hint() argument
  • #161: Fix EagerCursor::getSingleResult() behavior
1.0.6

Pull requests completed for the 1.0.6 release:

  • #157: Fix createCollection event dispatching
  • #159: Allow string or array Cursor::hint() argument
  • #161: Fix EagerCursor::getSingleResult() behavior
1.1.2

Pull requests completed for the 1.1.2 release:

  • #150: Cursor::getSingleResult() should not use keys in toArray()
1.0.5

Pull requests completed for the 1.0.5 release:

  • #150: Cursor::getSingleResult() should not use keys in toArray()
1.1.1

Pull requests completed for the 1.1.1 release:

  • #148: Reset cursor before and after getSingleResult()
  • #149: Use integer-casted argument in Cursor::batchSize()
1.1.0

Pull requests completed for the 1.1.0 release:

  • #92: Add get/setReadPreference() methods on core classes
  • #97: Implement Collection::aggregate() helper
  • #103: Support array argument in Builder::select() and exclude()
  • #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: 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: Adding $nor query operator for Builder and Expr
  • #118: Documentation cleanup
  • #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 library
  • #121: Reorder methods alphabetically
  • #123: ArrayIterator improvements
    • Allow offsetSet() to append values
    • Fix valid() return value if an array element is false
  • #124: Deprecated passing scalar $query argument to Collection::update()
  • #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: 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: 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: 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: Add $rename update operator for Builder and Expr
  • #131: Remove $cmd args/properties and deprecate mongoCmd option
  • #132: Make full command result accessible in ArrayIterator
  • #140: Add initialize() calls in Connection methods to avoid use of null objects
  • #139: Builder::sort() should default to ascending order
  • #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: Expr::mod() should take explicit divisor/remainder args

Additional commits included in 1.1.0:

  • d51a44d: Support $elemMatch in query projections (closes #101)
  • e92f0f2: Remove unused $options argument in Expr::equals()
  • 773423a: Use driver's return value in Collection::batchInsert() (closes #93)
  • 114a0ae: Fix cursor creation when MapReduce's db output option is used
  • 8bc1466: Ensure Cursor::limit() argument is casted to an integer
  • 6afee47: Deprecate Connection::getStatus() (to be removed in 1.2)
  • 05258d4: Deprecate Database force/prev/resetError() methods (to be removed in 1.2)
  • 25a8025: Restore Query::TYPE_GEO_LOCATION constant for BC, but deprecate it
1.0.4
  • fabcf49: Allow 1.5.x driver versions in composer.json
  • c7b6ef9: Convert "safe" write option to "w" for drivers 1.3.0+
  • 89c7f44: Check for null $mongo property in Connected::getStatus()
  • 9b71337: Support MongoClient in Connection::isConnected()
  • 009ea85: Remove executable bit from class files
  • f70e2a7: Remove code duplication in LoggableCursor and make docs consistent
  • d68f7bd: Make Cursor return values consistent with MongoCursor
  • 8bf686d: Clean up Cursor and EagerCursor docs and tests
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity