An open API service indexing awesome lists of open source software.

https://github.com/k-kinzal/testcontainers-php

Test container implementation for legacy PHP
https://github.com/k-kinzal/testcontainers-php

php testcontainers

Last synced: 6 months ago
JSON representation

Test container implementation for legacy PHP

Awesome Lists containing this project

README

          

# testcontainers-php

[![GitHub Actions](https://github.com/k-kinzal/testcontainers-php/actions/workflows/ci.yaml/badge.svg)](https://github.com/k-kinzal/testcontainers-php/actions)
[![CircleCI](https://circleci.com/gh/k-kinzal/testcontainers-php.svg?style=shield)](https://circleci.com/gh/k-kinzal/testcontainers-php)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A PHP implementation of [Testcontainers](https://testcontainers.com/) that supports PHP versions from 5.6 to 8.5, including EOL versions. This library enables you to use Docker containers for your integration tests with minimal dependencies.

If you are using a supported PHP version, consider using the official [testcontainers/testcontainers](https://packagist.org/packages/testcontainers/testcontainers) instead.

## Features

- Supports PHP 5.6 to 8.5 (including EOL versions)
- Minimal dependencies for easy integration
- Complete container lifecycle management
- Various configuration options for containers
- Multiple wait strategies to ensure services are ready
- Support for remote Docker hosts and SSH port forwarding

## Requirements

- Docker command line tool (docker CLI)
- PHP 5.6 or later

## Installation

```bash
composer require --dev k-kinzal/testcontainers-php
```

## Quick Start

```php