CARVIEW |
Select Language
HTTP/2 200
date: Tue, 22 Jul 2025 23:13:34 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"6a8c8c6bf31317dfc3f62e166fdc5591"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=R0nHZ%2F2Tl9wXws41vlJ7dYS742CmBMc9PvGO3vAGXHv4FTKEDFphZuFSuWIWn0NHwExGqH%2BX%2BJ6vh5ntPqbCS18T%2B%2FQcl0T3emaDVHhScPKqh6XZBaZ3Ab96O4ymcG6M9kRLwhaUe1W6NhJDRQqp8dTmfnFooq1h%2BaAO2HFCxHKKJkzBrHq%2FPtSwuH7frGJHxWPilSMGf%2FjaeGEQcS06TuwaVG45Mrm2dFhLLSPDVTLOU2g%2BgaDgqE1DVzqxmMn9lLaZA9weiNoxEuASF11HIg%3D%3D--%2FWXAYIpRJ%2BRzBznt--GtCnCywniS1T6kafpseZ7A%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.220804836.1753226014; Path=/; Domain=github.com; Expires=Wed, 22 Jul 2026 23:13:34 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 22 Jul 2026 23:13:34 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: DD26:B5FA6:1B07F5:250A82:68801B1E
Release 2.0.0 Β· mongodb/mongo-php-driver Β· GitHub
Loading
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 209
2.0.0
Compare
·
14 commits
to v2.0
since this release
The PHP team is happy to announce that version 2.0.0 of the mongodb PHP extension is now available on PECL.
Release Highlights
This major release introduces a number of backwards-incompatible changes aimed at simplifying and modernizing the extension's API, cleaning up deprecated functionality, and improving type safety and runtime behavior.
API Cleanups and Removals
- Deprecated constructor options have been removed from the
Query
andManager
classes. - The
getServer()
method and internalManager
references have been removed from APM event classes to streamline event data structures. - The
CursorId
class has been removed;Cursor::getId()
now returns anInt64
directly. - Support for passing
WriteConcern
andReadPreference
objects directly to execute methods has been removed in favor of usingreadPreference
andwriteConcern
options. - Legacy exceptions such as
WriteException
andSSLConnectionException
have been removed.
Stronger Typing and Safer APIs
- The
UTCDateTime
constructor no longer accepts strings or floats. It now only accepts integer millisecond timestamps or instances ofDateTimeInterface
. WriteResult
getters will now throw exceptions when called on unacknowledged writes, making error states more explicit.- The
ReadPreference
class now requires string mode constants in its constructor. Support for legacy integer constants has been removed.
Deprecation and Legacy Cleanup
- The
Serializable
interface has been removed from BSON classes, following its deprecation in PHP 8.1. - All deprecated global BSON functions have been removed; users should use methods on the
Document
class instead. - Several configure options (
--with-libbson
,--with-libmongoc
,--enable-system-ciphers
,--with-openssl-dir
) have been removed to simplify the build process.
New Features and Improvements
CursorInterface
now extends PHPβs nativeIterator
interface.UTCDateTimeInterface
introduces a newtoDateTimeImmutable()
method.- URI options that expect booleans will now throw if a non-boolean value is provided, preventing silent misconfiguration.
Library Upgrades
- The extension now bundles libmongoc 1.30.3, bringing in the latest stability and feature improvements.
Compatibility updates
- This release requires an upgrade to the
mongodb/mongodb
Composer library, which introduces compatibility changes for this extension version. Be sure to update your Composer dependencies accordingly. - PHP 8.1+ Required: The minimum required PHP version is now 8.1, as support for older versions (PHP 7.4 and 8.0) has been dropped.
- MongoDB 4.2+ Required: Future versions of the library will require MongoDB 4.2 or later. MongoDB 4.0 support is deprecated.
A complete list of resolved issues in this release may be found in JIRA.
Documentation
Documentation is available on PHP.net.
Installation
You can either download and install the source manually, or install the extension via PECL:
pecl install mongodb-2.0.0
Or update an existing installation with:
pecl upgrade mongodb-2.0.0
Windows binaries are attached to the GitHub release notes.
Assets 21
9 people reacted
You canβt perform that action at this time.