From fd593896766e4b686552412d24b3c24d12eb49bb Mon Sep 17 00:00:00 2001 From: Jan Klan Date: Wed, 7 May 2025 10:25:16 +0930 Subject: [PATCH 1/4] Use Psql 17 in the example command --- tests/Integration/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Integration/README.md b/tests/Integration/README.md index 43def368..6204dfc5 100644 --- a/tests/Integration/README.md +++ b/tests/Integration/README.md @@ -21,7 +21,7 @@ docker-compose up -d Or use a plain Docker command: ```bash -docker run --name postgres-doctrine-test -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e POSTGRES_DB=postgres_doctrine_test -p 5432:5432 -d postgres:14 +docker run --name postgres-doctrine-test -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e POSTGRES_DB=postgres_doctrine_test -p 5432:5432 -d postgres:17 ``` ### Run the Tests From cf87c955a7e17f6427d9000e26817afa6e76b2bc Mon Sep 17 00:00:00 2001 From: Jan Klan Date: Wed, 7 May 2025 10:26:43 +0930 Subject: [PATCH 2/4] Improve integration readme Maybe obvious, but not really: I had an older set of deps installed and my integration tests were failing because of that. It took me 30 seconds to fix, but maybe this readme line will save that time to millions of developers, saving some trees as the end result! :) --- tests/Integration/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Integration/README.md b/tests/Integration/README.md index 6204dfc5..96784087 100644 --- a/tests/Integration/README.md +++ b/tests/Integration/README.md @@ -27,6 +27,8 @@ docker run --name postgres-doctrine-test -e POSTGRES_PASSWORD=postgres -e POSTGR ### Run the Tests ```bash +# Install the latest dependencies +composer update # Run the integration tests composer run-integration-tests ``` From 6b6cd4018e3808fe9bb7139619c52353a426bdd1 Mon Sep 17 00:00:00 2001 From: Jan Klan Date: Wed, 7 May 2025 10:27:22 +0930 Subject: [PATCH 3/4] Remove obsolete version statement --- docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0561d1c0..498edb16 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.8' - services: postgres: image: postgres:17 From 8a8025a4b8fb021c860f395482b5b5af2e99d9d1 Mon Sep 17 00:00:00 2001 From: Jan Klan Date: Wed, 7 May 2025 10:28:07 +0930 Subject: [PATCH 4/4] Allow configuring Postgres through env variables while using Compose --- docker-compose.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 498edb16..430bec19 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,12 @@ services: postgres: - image: postgres:17 + image: postgres:${POSTGRES_VERSION:-17} environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres_doctrine_test + POSTGRES_USER: ${POSTGRES_USER:-postgres} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} + POSTGRES_DB: ${POSTGRES_DB:-postgres_doctrine_test} ports: - - "5432:5432" + - "${POSTGRES_PORT:-5432}:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: