File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -118,7 +118,10 @@ 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 ;
124+ echo 'with emulated prepares ' , ($ emulatePrepares ? 'ON ' : 'OFF ' ), PHP_EOL ;
122125
123126 $ host = getRequiredEnv ('POSTGRES_HOST ' );
124127 $ port = getOptionalEnvOrDefault ('POSTGRES_PORT ' , '5432 ' );
@@ -131,6 +134,7 @@ function getRequiredEnv(string $name): string
131134 $ password ,
132135 [
133136 PDO ::ATTR_ERRMODE => PDO ::ERRMODE_EXCEPTION ,
137+ PDO ::ATTR_EMULATE_PREPARES => $ emulatePrepares ,
134138 ],
135139 );
136140
You can’t perform that action at this time.
0 commit comments