> ## Documentation Index
> Fetch the complete documentation index at: https://docker-php.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install the client and its matching generated API package.

## Requirements

* PHP 8.2 or later, with the `mbstring` extension.
* [Composer](https://getcomposer.org/).
* Access to a Docker daemon with API v1.45 or later (Docker Engine 26.0 or later).

Docker PHP 4.0 is the last release line that supports PHP 8.1.

## Stable installation

```bash theme={null}
composer require "docker-php/docker-php:^4.0"
```

Composer also installs `docker-php/docker-php-api`, choosing the newest
[API line](https://docker-php.mintlify.site/api-versions.md) unless you require one. Requests negotiate with the
daemon, so an older daemon still works. Require a specific line if your code
depends on generated model names or fields.

## Test the development version

For a disposable test application, explicitly allow both development packages:

```bash theme={null}
composer require "docker-php/docker-php:4.1.x-dev" --with-all-dependencies
```

Do not use these moving development versions for an unattended production
upgrade. Commit your application's `composer.lock` after testing.

If you already use Docker PHP or Beluga, follow the [migration guide](https://docker-php.mintlify.site/migration.md)
instead of installing both package families together.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.