{"id":13480773,"url":"https://github.com/mongodb/mongo-php-driver","last_synced_at":"2025-12-16T16:50:24.583Z","repository":{"id":16756397,"uuid":"19514152","full_name":"mongodb/mongo-php-driver","owner":"mongodb","description":"The Official MongoDB PHP driver","archived":false,"fork":false,"pushed_at":"2025-03-13T21:02:13.000Z","size":11412,"stargazers_count":894,"open_issues_count":15,"forks_count":209,"subscribers_count":70,"default_branch":"v2.x","last_synced_at":"2025-04-05T00:02:49.290Z","etag":null,"topics":["mongodb","mongodb-driver","php"],"latest_commit_sha":null,"homepage":"https://pecl.php.net/package/mongodb","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mongodb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-05-06T23:18:32.000Z","updated_at":"2025-03-13T14:49:02.000Z","dependencies_parsed_at":"2023-02-17T18:15:47.853Z","dependency_job_id":"a4315100-7ad2-4b35-bcf5-0bb6738d198f","html_url":"https://github.com/mongodb/mongo-php-driver","commit_stats":{"total_commits":3234,"total_committers":35,"mean_commits":92.4,"dds":0.5235003092145949,"last_synced_commit":"1a1e793c80069aa70cc1228df61ec98dc8b05d62"},"previous_names":[],"tags_count":126,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-php-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-php-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-php-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-php-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb","download_url":"https://codeload.github.com/mongodb/mongo-php-driver/tar.gz/refs/heads/v2.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248182019,"owners_count":21060891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mongodb","mongodb-driver","php"],"created_at":"2024-07-31T17:00:44.826Z","updated_at":"2025-12-16T16:50:24.577Z","avatar_url":"https://github.com/mongodb.png","language":"PHP","funding_links":[],"categories":["PHP","目录","Table of Contents","Libraries"],"sub_categories":["NoSQL","PHP"],"readme":"# MongoDB PHP Driver\n\n[![Tests](https://github.com/mongodb/mongo-php-driver/actions/workflows/tests.yml/badge.svg)](https://github.com/mongodb/mongo-php-driver/actions/workflows/tests.yml)\n[![Coverage Status](https://coveralls.io/repos/github/mongodb/mongo-php-driver/badge.svg?branch=master)](https://coveralls.io/github/mongodb/mongo-php-driver?branch=master)\n[![Coding Standards](https://github.com/mongodb/mongo-php-driver/actions/workflows/clang-format.yml/badge.svg)](https://github.com/mongodb/mongo-php-driver/actions/workflows/clang-format.yml)\n\nThis extension is developed atop the\n[libmongoc](https://github.com/mongodb/mongo-c-driver) and\n[libbson](https://github.com/mongodb/libbson) libraries. It provides a minimal\nAPI for core driver functionality: commands, queries, writes, connection\nmanagement, and BSON serialization.\n\nUserland PHP libraries that depend on this extension may provide higher level\nAPIs, such as query builders, individual command helper methods, and GridFS.\nApplication developers should consider using this extension in conjunction with\nthe [MongoDB PHP library](https://github.com/mongodb/mongo-php-library), which\nimplements the same higher level APIs found in MongoDB drivers for other\nlanguages.\n\n## Documentation\n\n - https://www.php.net/mongodb\n - https://www.mongodb.com/docs/drivers/php-drivers/\n\n## Installation\n\n### With pie\n\nTo install this extension, you need [pie](https://github.com/php/pie) installed on your system. `pie` is a modern tool for managing PHP extensions.\n\nInstall the [`mongodb/mongodb-extension`](https://packagist.org/packages/mongodb/mongodb-extension) package from Packagist using the following command:\n\n```shell\npie install mongodb/mongodb-extension\n```\n\nThis will automatically download, build, and enable the MongoDB extension for your PHP installation.\n\nAdd a version constraint after the extension name to restrict can be installed:\n\n```shell\npie install mongodb/mongodb-extension:^2.1.0\n```\n\nThe constraint `^2.1.0` will install the latest version `\u003e= 2.1.0 \u003c 3.0.0-dev`.\n\n\nFor more details on using `pie`, see the [pie documentation](https://github.com/php/pie).\n\n### with pecl\n\n\u003e [!NOTE]\n\u003e Using pecl to install extensions is deprecated.\n\nTo build and install the extension:\n\n```shell\npecl install mongodb\necho \"extension=mongodb.so\" \u003e\u003e `php --ini | grep \"Loaded Configuration\" | sed -e \"s|.*:\\s*||\"`\n```\n\nThe MongoDB PHP Driver follows [semantic versioning](https://semver.org/) for its releases.\n\nAdditional installation instructions may be found in the\n[PHP.net documentation](https://php.net/manual/en/mongodb.installation.php).\n\nThis extension is intended to be used alongside the\n[MongoDB PHP Library](https://github.com/mongodb/mongo-php-library), which is\ndistributed as the\n[`mongodb/mongodb`](https://packagist.org/packages/mongodb/mongodb) package for\n[Composer](https://getcomposer.org).\n\n## Release Integrity\n\n\u003e [!NOTE]\n\u003e Integrity validation is not yet supported when installing with `pie`. If you require signature verification, use the manual or PECL installation methods described below.\n\nReleases are created automatically and signed using the \n[PHP team's GPG key](https://pgp.mongodb.com/php-driver.asc). This applies to\nthe git tag as well as all release packages provided as part of a\n[GitHub release](https://github.com/mongodb/mongo-php-library/releases). To\nverify the provided packages, download the key and import it using `gpg`:\n\n```shell\ngpg --import php-driver.asc\n```\n\n### PECL package\n\nPECL packages are made available as release artifacts on GitHub, as well as on\nthe [PECL homepage](https://pecl.php.net/mongodb). The GitHub release will also\ncontain a detached signature file for the PECL package (named\n`mongodb-X.Y.Z.tgz.sig`).\n\nTo verify the integrity of the downloaded package, run the following command:\n\n```shell\ngpg --verify mongodb-X.Y.Z.tgz.sig mongodb-X.Y.Z.tgz\n```\n\n\u003e [!NOTE]\n\u003e No verification is done when using `pecl` to install the package. To ensure\n\u003e release integrity when using `pecl`, download the tarball manually from the\n\u003e GitHub release, verify the signature, then install the package from the\n\u003e downloaded tarball using `pecl install mongodb-X.Y.Z.tgz`.\n\n### Windows\n\nWindows binaries distributed through GitHub releases contain a detached\nsignature for the `php_mongodb.dll` file named `php_mongodb.dll.sig`. To verify\nthe integrity of the DLL, run the following command:\n\n```shell\ngpg --verify php_mongodb.dll.sig php_mongodb.dll.tgz\n```\n\n\u003e [!NOTE]\n\u003e Windows binaries distributed directly through PECL are not signed by MongoDB\n\u003e and cannot be verified. If you need to verify the integrity of the downloaded\n\u003e binary, always download them from the GitHub release.\n\n## Reporting Issues\n\nIssues pertaining to the extension should be reported in the\n[PHPC](https://jira.mongodb.org/secure/CreateIssue!default.jspa?project-field=PHPC)\nproject in MongoDB's JIRA. Library-related issues should be reported in the\n[PHPLIB](https://jira.mongodb.org/secure/CreateIssue!default.jspa?project-field=PHPLIB)\nproject.\n\nFor general questions and support requests, please use one of MongoDB's\n[Technical Support](https://docs.mongodb.com/manual/support/) channels.\n\n### Security Vulnerabilities\n\nIf you've identified a security vulnerability in a driver or any other MongoDB\nproject, please report it according to the instructions in\n[Create a Vulnerability Report](https://docs.mongodb.org/manual/tutorial/create-a-vulnerability-report).\n\n## Development\n\nDevelopment is tracked in the\n[PHPC](https://jira.mongodb.org/projects/PHPC/summary) project in MongoDB's\nJIRA. Documentation for contributing to this project may be found in\n[CONTRIBUTING.md](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fmongo-php-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb%2Fmongo-php-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fmongo-php-driver/lists"}