From 6dd5baaa0e4338cbacebc96aa6437bf1b3cf74cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Thu, 19 Jun 2025 17:58:18 +0200 Subject: [PATCH 1/3] Update installation instruction to use "pie" --- .github/workflows/release.yml | 14 +++++--------- README.md | 26 ++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd657e663..bb383b0e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,9 @@ on: env: default-release-message: | - The PHP team is happy to announce that version {0} of the [mongodb](https://pecl.php.net/package/mongodb) PHP extension is now available on PECL. + The PHP team is happy to announce that version {0} of the MongoDB PHP extension is now available. + - [mongodb/mongodb-extension](https://packagist.org/packages/mongodb/mongodb-extension#{0}) on Packagist. + - [mongodb](https://pecl.php.net/package/mongodb) on PECL **Release Highlights** @@ -32,16 +34,10 @@ env: You can either download and install the source manually, or you can install the extension with: ``` - pecl install mongodb-{0} + pie install mongodb/mongodb-extension:{0} ``` - or update with: - - ``` - pecl upgrade mongodb-{0} - ``` - - Windows binaries are attached to the GitHub release notes. + Sources and Windows binaries are attached to the GitHub release notes. jobs: prepare-release: diff --git a/README.md b/README.md index cb046542b..99de5fa38 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,30 @@ languages. - https://www.php.net/mongodb - https://www.mongodb.com/docs/drivers/php-drivers/ -## Installation +## Installation with pie + +To install this extension, you need [pie](https://github.com/php/pie) installed on your system. `pie` is a modern tool for managing PHP extensions. + +Install the [`mongodb/mongodb-extension`](https://packagist.org/packages/mongodb/mongodb-extension) package from Packagist using the following command: + +```shell +pie install mongodb/mongodb-extension +``` + +This will automatically download, build, and enable the MongoDB extension for your PHP installation. + +For more details on using `pie`, see the [pie documentation](https://github.com/php/pie). + +## Installation with pecl + +Using pecl to install extensions is deprecated, To build and install the driver: - $ pecl install mongodb - $ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` +```shell +pecl install mongodb +echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` +``` The MongoDB PHP Driver follows [semantic versioning](https://semver.org/) for its releases. @@ -40,7 +58,7 @@ distributed as the [`mongodb/mongodb`](https://packagist.org/packages/mongodb/mongodb) package for [Composer](https://getcomposer.org). -## Release Integrity +### Release Integrity Releases are created automatically and signed using the [PHP team's GPG key](https://pgp.mongodb.com/php-driver.asc). This applies to From d3b104cfb3c8d1977f031a1fb9abb1a0faf91990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Mon, 23 Jun 2025 14:19:32 +0200 Subject: [PATCH 2/3] Change titles and add version constraint --- README.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 99de5fa38..274b4bf31 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,9 @@ languages. - https://www.php.net/mongodb - https://www.mongodb.com/docs/drivers/php-drivers/ -## Installation with pie +## Installation + +### With pie To install this extension, you need [pie](https://github.com/php/pie) installed on your system. `pie` is a modern tool for managing PHP extensions. @@ -34,13 +36,23 @@ pie install mongodb/mongodb-extension This will automatically download, build, and enable the MongoDB extension for your PHP installation. +Add a version constraint after the extension name to restrict can be installed: + +```shell +pie install mongodb/mongodb-extension:^2.1.0 +``` + +The constraint `^2.1.0` will install the latest version `>= 2.1.0 < 3.0.0-dev`. + + For more details on using `pie`, see the [pie documentation](https://github.com/php/pie). -## Installation with pecl +### with pecl -Using pecl to install extensions is deprecated, +> [!NOTE] +> Using pecl to install extensions is deprecated. -To build and install the driver: +To build and install the extension: ```shell pecl install mongodb @@ -58,7 +70,7 @@ distributed as the [`mongodb/mongodb`](https://packagist.org/packages/mongodb/mongodb) package for [Composer](https://getcomposer.org). -### Release Integrity +## Release Integrity Releases are created automatically and signed using the [PHP team's GPG key](https://pgp.mongodb.com/php-driver.asc). This applies to From 54abe3837c1e3056af2db80cde27bc690c906a93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Mon, 23 Jun 2025 14:41:07 +0200 Subject: [PATCH 3/3] Add note that package integrity is not supported using pie --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 274b4bf31..6a7c76bb2 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,9 @@ distributed as the ## Release Integrity +> [!NOTE] +> Integrity validation is not yet supported when installing with `pie`. If you require signature verification, use the manual or PECL installation methods described below. + Releases are created automatically and signed using the [PHP team's GPG key](https://pgp.mongodb.com/php-driver.asc). This applies to the git tag as well as all release packages provided as part of a