> ## 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.

# Contribute to the docs

> Edit the Git-maintained documentation and preview it locally.

The documentation lives in the `docs/` directory of
[docker-php/docker-php](https://github.com/docker-php/docker-php). Pages are MDX
files; `docs.json` defines their navigation and site settings.

## Preview locally

Use Node.js 22 or 24 LTS and PHP 8.1 or later. From the repository root:

```bash theme={null}
cd docs
npm ci
npm run dev
```

Open the localhost URL printed by Mintlify. The preview updates when you edit
pages. Stop it with Ctrl+C.

## Check changes

```bash theme={null}
npm run validate
npm run check:links
npm run check:examples
```

The checks validate Mintlify configuration and MDX, internal links and heading
anchors, and PHP example syntax. Syntax checks do not prove an example's daemon
behavior. Test operational examples separately against a development daemon.

The [Guzzle connection examples](/guides/guzzle) have a separate test suite.
After installing the development dependencies, run it from the repository root:

```bash theme={null}
composer test-guzzle
```

These tests execute the documented PHP snippets against temporary local Unix,
HTTP and HTTPS servers. They do not need a Docker daemon. They also check
certificate rejection, client certificates, request bodies, API errors and
the handlers' streaming behavior.

Add new pages to `docs.json`, use site-relative links such as `/connection`, and
keep examples aligned with the current API models. Do not edit generated API
code to make an example work.

Keep unreleased instructions clearly marked until their packages are published.
Avoid documenting legacy `DockerAsync` behavior as part of 3.0.

## Pull requests

Commit messages must follow
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
For example, `docs: explain exec stream callbacks`.

See [CONTRIBUTING.md](https://github.com/docker-php/docker-php/blob/main/CONTRIBUTING.md)
for the library's contribution workflow. Report documentation errors through
[GitHub issues](https://github.com/docker-php/docker-php/issues).


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