Skip to content

Commit 40da5b3

Browse files
committed
Test pdo_pgsql with emulate prepares ON/OFF
1 parent d532775 commit 40da5b3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,17 @@ jobs:
231231
matrix:
232232
php-version:
233233
- "8.2"
234+
emulate-prepares:
235+
- "ON"
236+
- "OFF"
234237

235238
services:
236239
postgis:
237240
image: "postgis/postgis:17-3.5-alpine"
238241
env:
239242
POSTGRES_USER: postgres
240243
POSTGRES_PASSWORD: postgres
244+
EMULATE_PREPARES: ${{ matrix.emulate-prepares }}
241245
ports:
242246
- "5432:5432"
243247

phpunit-bootstrap.php

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ function getRequiredEnv(string $name): string
118118
break;
119119

120120
case 'postgis_pdo':
121+
$emulatePrepares = getOptionalEnv('EMULATE_PREPARES') === 'ON';
122+
121123
echo 'Using PostgisEngine with PdoPgsqlDriver', PHP_EOL;
122124

123125
$host = getRequiredEnv('POSTGRES_HOST');
@@ -131,6 +133,7 @@ function getRequiredEnv(string $name): string
131133
$password,
132134
[
133135
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
136+
PDO::ATTR_EMULATE_PREPARES => $emulatePrepares,
134137
],
135138
);
136139

0 commit comments

Comments
 (0)