Skip to content

Commit b58783c

Browse files
authored
Update installation instruction to use pie (#1846)
1 parent 709a236 commit b58783c

File tree

2 files changed

+41
-12
lines changed

2 files changed

+41
-12
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ on:
1515

1616
env:
1717
default-release-message: |
18-
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.
18+
The PHP team is happy to announce that version {0} of the MongoDB PHP extension is now available.
19+
- [mongodb/mongodb-extension](https://packagist.org/packages/mongodb/mongodb-extension#{0}) on Packagist.
20+
- [mongodb](https://pecl.php.net/package/mongodb) on PECL
1921
2022
**Release Highlights**
2123
@@ -32,16 +34,10 @@ env:
3234
You can either download and install the source manually, or you can install the extension with:
3335
3436
```
35-
pecl install mongodb-{0}
37+
pie install mongodb/mongodb-extension:{0}
3638
```
3739
38-
or update with:
39-
40-
```
41-
pecl upgrade mongodb-{0}
42-
```
43-
44-
Windows binaries are attached to the GitHub release notes.
40+
Sources and Windows binaries are attached to the GitHub release notes.
4541
4642
jobs:
4743
prepare-release:

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,40 @@ languages.
2424

2525
## Installation
2626

27-
To build and install the driver:
27+
### With pie
2828

29-
$ pecl install mongodb
30-
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
29+
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.
30+
31+
Install the [`mongodb/mongodb-extension`](https://packagist.org/packages/mongodb/mongodb-extension) package from Packagist using the following command:
32+
33+
```shell
34+
pie install mongodb/mongodb-extension
35+
```
36+
37+
This will automatically download, build, and enable the MongoDB extension for your PHP installation.
38+
39+
Add a version constraint after the extension name to restrict can be installed:
40+
41+
```shell
42+
pie install mongodb/mongodb-extension:^2.1.0
43+
```
44+
45+
The constraint `^2.1.0` will install the latest version `>= 2.1.0 < 3.0.0-dev`.
46+
47+
48+
For more details on using `pie`, see the [pie documentation](https://github.com/php/pie).
49+
50+
### with pecl
51+
52+
> [!NOTE]
53+
> Using pecl to install extensions is deprecated.
54+
55+
To build and install the extension:
56+
57+
```shell
58+
pecl install mongodb
59+
echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
60+
```
3161

3262
The MongoDB PHP Driver follows [semantic versioning](https://semver.org/) for its releases.
3363

@@ -42,6 +72,9 @@ distributed as the
4272

4373
## Release Integrity
4474

75+
> [!NOTE]
76+
> Integrity validation is not yet supported when installing with `pie`. If you require signature verification, use the manual or PECL installation methods described below.
77+
4578
Releases are created automatically and signed using the
4679
[PHP team's GPG key](https://pgp.mongodb.com/php-driver.asc). This applies to
4780
the git tag as well as all release packages provided as part of a

0 commit comments

Comments
 (0)