Skip to content

DOCSP-50960: Install with pie #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions source/get-started.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,27 @@ Download and Install

- :php:`PHP <install>` version 7.4 or later
- `Composer <https://getcomposer.org/download/>`__ version 2.0 or later
- :github:`pie </php/pie/blob/main/docs/usage.md>`

.. step:: Install the MongoDB PHP extension

Run the following command to install the ``mongodb`` PHP extension:

.. code-block:: bash

sudo pecl install mongodb
pie install mongodb/mongodb-extension

.. step:: Update your PHP configuration file
.. tip:: Specify the PHP Extension Version

To enable the ``mongodb`` extension in your PHP configuration file, add the
following line to the top of your ``php.ini`` file:

.. code-block:: none

extension=mongodb.so

.. tip::

You can locate your ``php.ini`` file by running the following command
in your shell:
To install a specific version of the {+extension-short+}, include
the version number as shown in the following command:

.. code-block:: bash

php --ini
pie install mongodb/mongodb-extension:^{+full-version+}

To install a {+extension-short+} version before v1.21, you must
use the :php:`pecl command <mongodb.installation#mongodb.installation.pecl>`.

.. step:: Create a project directory

Expand Down
11 changes: 10 additions & 1 deletion source/references/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,16 @@ directory:

.. code-block:: bash

pecl upgrade mongodb-<version-number>
pie install mongodb/mongodb-extension:^<version-number>

.. tip:: Previous PHP Extension Versions

To upgrade to a {+extension-short+} version before v1.21,
use the following command:

.. code-block:: bash

pecl upgrade mongodb-<version-number>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: should we add a sudo here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The official pecl docs don't mention sudo, I don't think this is required by default. I can mess with the filesystem permissions. I would remove the sudo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, since it's not in the pecl docs I'll remove


To upgrade the PHP library version, replace ``<version-number>`` with the
version number you want to upgrade to and run the following command in your
Expand Down
Loading