Skip to content

Commit 4a061f9

Browse files
committed
update version
1 parent 15ecb0e commit 4a061f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+271
-1160
lines changed

.github/workflows/ci.yml

Lines changed: 87 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -3,220 +3,99 @@ name: CI
33
on:
44
push:
55
pull_request:
6-
schedule:
7-
- cron: '0 0 * * 0'
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
810

911
jobs:
1012
tests:
1113
name: Tests (PHP ${{ matrix.php }}, PostgreSQL ${{ matrix.postgres }}, PostGIS ${{ matrix.postgis }}, ORM ${{ matrix.orm || 'default' }}, DBAL ${{ matrix.dbal || 'default' }})
1214
runs-on: ubuntu-latest
1315
strategy:
16+
fail-fast: false
1417
matrix:
1518
include:
1619
# Lowest deps
17-
- php: '8.0'
18-
postgres: '11'
19-
postgis: '3.0'
20-
phpunit-flags: '--exclude-group=versioned'
21-
composer-flags: '--prefer-stable --prefer-lowest'
22-
- php: '8.0'
23-
postgres: '11'
24-
postgis: '3.0'
25-
phpunit-flags: '--group=postgis-3.0'
26-
composer-flags: '--prefer-stable --prefer-lowest'
27-
28-
# PostgresSQL / PostGIS matrix with ORM
29-
# PHP 8.1, Postgres 11, ORM 2.9
30-
- php: '8.1'
31-
postgres: '11'
32-
postgis: '3.0'
33-
orm: '2.9'
34-
phpunit-flags: '--exclude-group=versioned'
35-
- php: '8.1'
36-
postgres: '11'
37-
postgis: '3.0'
38-
orm: '2.9'
39-
phpunit-flags: '--group=postgis-3.0'
4020
- php: '8.1'
41-
postgres: '11'
42-
postgis: '3.1'
43-
orm: '2.9'
44-
phpunit-flags: '--exclude-group=versioned'
45-
- php: '8.1'
46-
postgres: '11'
47-
postgis: '3.1'
48-
orm: '2.9'
49-
phpunit-flags: '--group=postgis-3.1'
50-
- php: '8.1'
51-
postgres: '11'
21+
postgres: '14'
5222
postgis: '3.2'
53-
orm: '2.9'
5423
phpunit-flags: '--exclude-group=versioned'
24+
composer-flags: '--prefer-stable --prefer-lowest'
5525
- php: '8.1'
56-
postgres: '11'
26+
postgres: '14'
5727
postgis: '3.2'
58-
orm: '2.9'
5928
phpunit-flags: '--group=postgis-3.2'
29+
composer-flags: '--prefer-stable --prefer-lowest'
30+
31+
# PostgresSQL / PostGIS matrix with ORM
32+
# PHP 8.1, Postgres 15, ORM 2.19
6033
- php: '8.1'
61-
postgres: '11'
62-
postgis: '3.3'
63-
orm: '2.9'
64-
phpunit-flags: '--exclude-group=versioned'
65-
- php: '8.1'
66-
postgres: '11'
67-
postgis: '3.3'
68-
orm: '2.9'
69-
phpunit-flags: '--group=postgis-3.3'
70-
- php: '8.1'
71-
postgres: '11'
34+
postgres: '15'
7235
postgis: '3.4'
73-
orm: '2.9'
36+
orm: '2.19'
7437
phpunit-flags: '--exclude-group=versioned'
7538
- php: '8.1'
76-
postgres: '11'
39+
postgres: '15'
7740
postgis: '3.4'
78-
orm: '2.9'
41+
orm: '2.19'
7942
phpunit-flags: '--group=postgis-3.4'
80-
# PHP 8.1, Postgres 12, ORM 2.9
81-
- php: '8.1'
82-
postgres: '12'
83-
postgis: '3.0'
84-
orm: '2.9'
85-
phpunit-flags: '--exclude-group=versioned'
86-
- php: '8.1'
87-
postgres: '12'
88-
postgis: '3.0'
89-
orm: '2.9'
90-
phpunit-flags: '--group=postgis-3.0'
91-
- php: '8.1'
92-
postgres: '12'
93-
postgis: '3.1'
94-
orm: '2.9'
95-
phpunit-flags: '--exclude-group=versioned'
96-
- php: '8.1'
97-
postgres: '12'
98-
postgis: '3.1'
99-
orm: '2.9'
100-
phpunit-flags: '--group=postgis-3.1'
101-
- php: '8.1'
102-
postgres: '12'
103-
postgis: '3.2'
104-
orm: '2.9'
105-
phpunit-flags: '--exclude-group=versioned'
106-
- php: '8.1'
107-
postgres: '12'
108-
postgis: '3.2'
109-
orm: '2.9'
110-
phpunit-flags: '--group=postgis-3.2'
111-
- php: '8.1'
112-
postgres: '12'
113-
postgis: '3.3'
114-
orm: '2.9'
115-
phpunit-flags: '--exclude-group=versioned'
116-
- php: '8.1'
117-
postgres: '12'
118-
postgis: '3.3'
119-
orm: '2.9'
120-
phpunit-flags: '--group=postgis-3.3'
43+
44+
# PHP 8.1, Postgres 16, ORM 2.19
12145
- php: '8.1'
122-
postgres: '12'
46+
postgres: '16'
12347
postgis: '3.4'
124-
orm: '2.9'
48+
orm: '2.19'
12549
phpunit-flags: '--exclude-group=versioned'
12650
- php: '8.1'
127-
postgres: '12'
51+
postgres: '16'
12852
postgis: '3.4'
129-
orm: '2.9'
53+
orm: '2.19'
13054
phpunit-flags: '--group=postgis-3.4'
131-
# PHP 8.1, Postgres 13, ORM 2.9
132-
- php: '8.1'
133-
postgres: '13'
134-
postgis: '3.0'
135-
orm: '2.9'
136-
phpunit-flags: '--exclude-group=versioned'
137-
- php: '8.1'
138-
postgres: '13'
139-
postgis: '3.0'
140-
orm: '2.9'
141-
phpunit-flags: '--group=postgis-3.0'
142-
- php: '8.1'
143-
postgres: '13'
144-
postgis: '3.1'
145-
orm: '2.9'
146-
phpunit-flags: '--exclude-group=versioned'
147-
- php: '8.1'
148-
postgres: '13'
149-
postgis: '3.1'
150-
orm: '2.9'
151-
phpunit-flags: '--group=postgis-3.1'
152-
- php: '8.1'
153-
postgres: '13'
154-
postgis: '3.2'
155-
orm: '2.9'
156-
phpunit-flags: '--exclude-group=versioned'
157-
- php: '8.1'
158-
postgres: '13'
159-
postgis: '3.2'
160-
orm: '2.9'
161-
phpunit-flags: '--group=postgis-3.2'
55+
56+
# PHP 8.1, Postgres 17, ORM 3.5
16257
- php: '8.1'
163-
postgres: '13'
164-
postgis: '3.3'
165-
orm: '2.9'
58+
postgres: '17'
59+
postgis: '3.6'
60+
orm: '3.5'
16661
phpunit-flags: '--exclude-group=versioned'
16762
- php: '8.1'
168-
postgres: '13'
169-
postgis: '3.3'
170-
orm: '2.9'
171-
phpunit-flags: '--group=postgis-3.3'
63+
postgres: '17'
64+
postgis: '3.6'
65+
orm: '3.5'
66+
phpunit-flags: '--group=postgis-3.6'
67+
68+
# PHP 8.1, Postgres 18, ORM 3.5
17269
- php: '8.1'
173-
postgres: '13'
174-
postgis: '3.4'
175-
orm: '2.9'
70+
postgres: '18'
71+
postgis: '3.6'
72+
orm: '3.5'
17673
phpunit-flags: '--exclude-group=versioned'
177-
code-coverage: 'yes'
17874
- php: '8.1'
179-
postgres: '13'
180-
postgis: '3.4'
181-
orm: '2.9'
182-
phpunit-flags: '--group=postgis-3.4'
75+
postgres: '18'
76+
postgis: '3.6'
77+
orm: '3.5'
78+
phpunit-flags: '--group=postgis-3.6'
18379
code-coverage: 'yes'
18480

185-
# DBAL only
186-
- php: '8.1'
187-
postgres: '11'
188-
postgis: '3.0'
189-
dbal: '2.13'
190-
phpunit-flags: '--exclude-group=versioned,orm'
191-
- php: '8.1'
192-
postgres: '11'
193-
postgis: '3.0'
194-
dbal: '2.13'
195-
phpunit-flags: '--group=postgis-3.0 --exclude-group=orm'
196-
- php: '8.1'
197-
postgres: '13'
198-
postgis: '3.1'
199-
dbal: '3.1'
200-
phpunit-flags: '--exclude-group=versioned,orm'
201-
- php: '8.1'
202-
postgres: '13'
203-
postgis: '3.1'
204-
dbal: '3.1'
205-
phpunit-flags: '--group=postgis-3.1 --exclude-group=orm'
81+
# DBAL only v3 & v4
82+
- php: '8.1'
83+
postgres: '18'
84+
postgis: '3.6'
85+
dbal: '3.7'
86+
phpunit-flags: '--group=postgis-3.6 --exclude-group=orm'
87+
- php: '8.4'
88+
postgres: '18'
89+
postgis: '3.6'
90+
dbal: '4.3'
91+
phpunit-flags: '--group=postgis-3.6 --exclude-group=orm'
20692

20793
# Next PHP version
208-
- php: '8.2'
209-
postgres: '13'
210-
postgis: '3.1'
94+
- php: 'latest'
95+
postgres: '18'
96+
postgis: '3.6'
21197
phpunit-flags: '--exclude-group=versioned'
212-
composer-flags: '--ignore-platform-reqs'
213-
experimental: true
214-
- php: '8.2'
215-
postgres: '13'
216-
postgis: '3.1'
217-
phpunit-flags: '--group=postgis-3.1'
218-
composer-flags: '--ignore-platform-reqs'
219-
experimental: true
98+
22099
services:
221100
postgis:
222101
image: postgis/postgis:${{ matrix.postgres }}-${{ matrix.postgis }}-alpine
@@ -232,14 +111,25 @@ jobs:
232111
233112
steps:
234113
- name: Checkout code
235-
uses: actions/checkout@v4
114+
uses: actions/checkout@v5
236115

237116
- name: Setup PHP
238117
uses: shivammathur/setup-php@v2
239118
with:
240119
php-version: ${{ matrix.php }}
241-
extensions: pdo_pgsql
242-
coverage: pcov
120+
extensions: pdo_pgsql, pgsql
121+
coverage: ${{ matrix.code-coverage == 'yes' && 'xdebug' || 'none' }}
122+
123+
- name: Get Composer cache directory
124+
id: composer-cache
125+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
126+
127+
- name: Cache Composer dependencies
128+
uses: actions/cache@v4
129+
with:
130+
path: ${{ steps.composer-cache.outputs.dir }}
131+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
132+
restore-keys: ${{ runner.os }}-composer-
243133

244134
- name: Install Doctrine ORM
245135
if: matrix.orm != ''
@@ -254,20 +144,25 @@ jobs:
254144
- name: Install dependencies
255145
run: |
256146
composer update --no-interaction --no-progress --prefer-dist ${{ matrix.composer-flags }}
257-
composer info -D
258-
259-
- name: Run tests
260-
if: matrix.code-coverage != 'yes'
261-
run: vendor/bin/phpunit ${{ matrix.phpunit-flags }}
147+
composer show -D
262148
263-
- name: Run tests with code coverage
149+
- name: Create coverage directory
264150
if: matrix.code-coverage == 'yes'
265-
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml ${{ matrix.phpunit-flags }}
151+
run: mkdir -p build/logs
266152

267-
- name: Upload coverage results to Coveralls
268-
if: matrix.code-coverage == 'yes'
269-
env:
270-
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
153+
- name: Run tests
271154
run: |
272-
composer global require php-coveralls/php-coveralls
273-
php-coveralls -v --coverage_clover=build/logs/clover.xml
155+
if [ "${{ matrix.code-coverage }}" == "yes" ]; then
156+
vendor/bin/phpunit --coverage-clover build/logs/clover.xml ${{ matrix.phpunit-flags }}
157+
else
158+
vendor/bin/phpunit ${{ matrix.phpunit-flags }}
159+
fi
160+
161+
- name: Upload coverage to Coveralls
162+
if: matrix.code-coverage == 'yes' && success()
163+
uses: coverallsapp/github-action@v2
164+
with:
165+
github-token: ${{ secrets.GITHUB_TOKEN }}
166+
file: build/logs/clover.xml
167+
flag-name: php-${{ matrix.php }}-pg${{ matrix.postgres }}-postgis${{ matrix.postgis }}
168+
parallel: true

.github/workflows/static.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
pull_request:
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
php-cs-fixer:
913
name: PHP-CS-Fixer

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ library.
2727

2828
| Dependency | Supported Versions |
2929
|:--------------|:-------------------|
30-
| PostGIS | >= 3.1 |
31-
| PostgreSQL | >= 13 |
30+
| PostGIS | >= 3.2 |
31+
| PostgreSQL | >= 14 |
3232
| Doctrine ORM | ^2.19 and ^3.0 |
3333
| Doctrine DBAL | ^3.7 and ^4.0 |
3434

@@ -328,24 +328,24 @@ PHP container connected to specific database containers.
328328
The script names follow the pattern
329329
`run-<POSTGRESQL_VERSION>-<POSTGIS_VERSION>.sh`.
330330

331-
To run the test suite against PostgreSQL 13 with PostGIS 3.1, use the script
332-
`./docker/run-13-31.sh`.
331+
To run the test suite against PostgreSQL 18 with PostGIS 3.6, use the script
332+
`./docker/run-18-36.sh`.
333333

334334
Tests are either PostGIS version specific (versioned) or agnostic, and are run
335335
separately using PHPUnit groups.
336336

337-
e.g. for PostGIS 3.1 and PostgreSQL 13
337+
e.g. for PostGIS 3.6 and PostgreSQL 18
338338

339339
```bash
340-
./docker/run-13-31.sh vendor/bin/phpunit --exclude-group=versioned
341-
./docker/run-13-31.sh vendor/bin/phpunit --group=postgis-3.1
340+
./docker/run-18-36.sh vendor/bin/phpunit --exclude-group=versioned
341+
./docker/run-18-36.sh vendor/bin/phpunit --group=postgis-3.6
342342
```
343343

344-
e.g. for PostGIS 3.0 and PostgreSQL 13
344+
e.g. for PostGIS 3.2 and PostgreSQL 14
345345

346346
```bash
347-
./docker/run-13-30.sh vendor/bin/phpunit --exclude-group=versioned
348-
./docker/run-13-30.sh vendor/bin/phpunit --group=postgis-3.0
347+
./docker/run-14-32.sh vendor/bin/phpunit --exclude-group=versioned
348+
./docker/run-14-32.sh vendor/bin/phpunit --group=postgis-3.2
349349
```
350350

351351
License

0 commit comments

Comments
 (0)