This directory contains integration tests that run against a real PostgreSQL database with PostGIS extensions. These tests validate that our custom DBAL types work correctly with an actual PostgreSQL instance, including PostGIS geometry and geography types.
- Docker (for running PostgreSQL with PostGIS)
- PHP 8.2+ with the
pdo_pgsqlextension
You can use Docker Compose to start PostgreSQL with PostGIS:
# Start PostgreSQL with PostGIS using Docker Compose
docker-compose up -dOr use a plain Docker command:
docker run --name postgres-doctrine-test -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e POSTGRES_DB=postgres_doctrine_test -p 5432:5432 -d postgis/postgis:18-3.6-alpine# Install the latest dependencies
composer update
# Run the integration tests
composer run-integration-testsThe tests use the following environment variables which can be customized:
POSTGRES_HOST(default: localhost)POSTGRES_PORT(default: 5432)POSTGRES_DB(default: postgres_doctrine_test)POSTGRES_USER(default: postgres)POSTGRES_PASSWORD(default: postgres)
You can set these variables before running the tests:
POSTGRES_HOST=custom-host POSTGRES_PORT=5433 composer run-integration-testsIf you used Docker Compose:
docker-compose down -vIf you used plain Docker:
docker stop postgres-doctrine-test
docker rm postgres-doctrine-testThese tests are automatically run in GitHub Actions against PostgreSQL 16, 17 & 18 with PostGIS for all supported PHP versions.
The workflow is defined in .github/workflows/integration-tests.yml.