Skip to content

Commit f99623d

Browse files
chore: run the project on PostgreSQL 18 (#463)
1 parent 8ac7a70 commit f99623d

File tree

5 files changed

+26
-17
lines changed

5 files changed

+26
-17
lines changed

.github/workflows/integration-tests.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,27 @@ jobs:
4040
fail-fast: false
4141
matrix:
4242
php: ['8.1', '8.2', '8.3', '8.4']
43-
postgis: ['3.4', '3.5']
44-
postgres: ['16', '17']
43+
postgis: ['3.4', '3.5', '3.6']
44+
postgres: ['16', '17', '18']
45+
exclude:
46+
# PostgreSQL 16: Docker images support only for PostGIS 3.4, 3.5
47+
- postgres: '16'
48+
postgis: '3.6'
49+
# PostgreSQL 18: Docker images support only for PostGIS 3.6
50+
- postgres: '18'
51+
postgis: '3.4'
52+
- postgres: '18'
53+
postgis: '3.5'
4554
include:
55+
# Code coverage on the latest stable combination
4656
- php: '8.4'
47-
postgis: '3.5'
48-
postgres: '17'
57+
postgres: '18'
58+
postgis: '3.6'
4959
calculate-code-coverage: true
5060

5161
services:
5262
postgres:
53-
image: postgis/postgis:${{ matrix.postgres }}-${{ matrix.postgis }}
63+
image: postgis/postgis:${{ matrix.postgres }}-${{ matrix.postgis }}-alpine
5464
env:
5565
POSTGRES_PASSWORD: postgres
5666
POSTGRES_USER: postgres
@@ -62,7 +72,6 @@ jobs:
6272
--health-interval 10s
6373
--health-timeout 5s
6474
--health-retries 5
65-
--mount type=tmpfs,destination=/var/lib/postgresql/data
6675
-e POSTGRES_INITDB_ARGS="--data-checksums"
6776
6877
steps:

devenv.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ in
2929
# https://devenv.sh/languages/
3030
languages.php = {
3131
enable = true;
32-
# PHP8.1 is this project least supported PHPversion.
32+
# PHP 8.1 is this project least supported PHP version.
3333
version = "8.1";
3434
extensions = [
3535
"ctype"
@@ -60,8 +60,8 @@ in
6060
services.postgres = {
6161
enable = true;
6262

63-
# Use PostgreSQL 17 to match Docker Compose and CI
64-
package = pkgs.postgresql_17;
63+
# Use PostgreSQL 18 to match Docker Compose and CI
64+
package = pkgs.postgresql_18;
6565

6666
listen_addresses = "127.0.0.1";
6767
port = config.env.POSTGRES_PORT;
@@ -98,7 +98,7 @@ in
9898
scripts.php-modules.exec = ''
9999
set -o 'errexit' -o 'pipefail'
100100
101-
echo 'Installed PHPmodules'
101+
echo 'Installed PHP modules'
102102
echo '---------------------'
103103
104104
${phpCommand} -m |
@@ -156,7 +156,7 @@ in
156156
# Conventional Commits
157157
commitizen.enable = true;
158158

159-
#Markdown files
159+
# Markdown files
160160
# markdownlint.enable = true;
161161
# mdformat = rec {
162162
# enable = true;

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
postgres:
3-
image: postgis/postgis:${POSTGRES_VERSION:-17}-3.4
3+
image: postgis/postgis:${POSTGRES_VERSION:-18}-${POSTGIS_VERSION:-3.6}-alpine
44
environment:
55
POSTGRES_USER: ${POSTGRES_USER:-postgres}
66
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}

docs/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ development environment:
115115
116116
The provided environment includes:
117117
118-
- PHP 8.1, which is the oldest PHPversion supported by this project.
118+
- PHP 8.1, which is the oldest PHP version supported by this project.
119119
- Composer
120-
- PostgreSQL 17 with PostGIS 3.4, started by `devenv up`.
120+
- PostgreSQL 18 with PostGIS 3.6, started by `devenv up`.
121121
- Pre-commit hooks (PHP-CS-Fixer, PHPStan, Rector, deptrac, ...).
122122
123123
### Local development
@@ -128,7 +128,7 @@ Using local-only plaintext secrets here is acceptable.
128128
For example, this file:
129129
130130
- Install [Harlequin](https://harlequin.sh/) database TUI.
131-
- Set PHPversion to 8.4.
131+
- Set PHP version to 8.4.
132132
- Change PostgreSQL related environment variables.
133133
134134
```nix

tests/Integration/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ docker-compose up -d
2121
Or use a plain Docker command:
2222

2323
```bash
24-
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:17-3.4
24+
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
2525
```
2626

2727
### Run the Tests
@@ -66,6 +66,6 @@ docker rm postgres-doctrine-test
6666

6767
## CI Integration
6868

69-
These tests are automatically run in GitHub Actions against PostgreSQL 16 and 17 with PostGIS 3.4 for all supported PHP versions.
69+
These tests are automatically run in GitHub Actions against PostgreSQL 16, 17 & 18 with PostGIS for all supported PHP versions.
7070

7171
The workflow is defined in `.github/workflows/integration-tests.yml`.

0 commit comments

Comments
 (0)