Welcome to this Tigris MongoDB compatibility and PHP example app. This repo aims to show a basic example of how you can use the power of Tigris MongoDB compatibility with PHP.
This project uses MongoDB PHP driver version 1.15 by default. Although you can change the driver version, the provided code example was only tested against the default version of MongoDB driver. Please note that the MongoDB PHP driver consists of two components: the extension and library.
Tigris MongoDB compatibility supports the MongoDB 6.0+ wire protocol, so any drivers or other components must support this version.
- Docker
- A Tigris Cloud account or you can self-host Tigris
- Create a project in Tigris.
- Create an application key, and copy the Project Name, Client ID, and Client Secret values.
Copy the .env.example
to a .env
file:
cp .env.example .env
And update the values with your Tigris Project Name, Client ID, and Client Secret.
Build the image:
DOCKER_BUILDKIT=0 docker build . -t tigris-mongodb-php-local
Run the example:
./get-started-local.sh
./get-started.sh
- Find out more about Tigris MongoDB compatibility
- Join the Tigris Discord