Skip to content

Commit

Permalink
emulate prepares on pooled pgsql
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Feb 5, 2025
1 parent a279f59 commit 2259338
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Illuminate/Foundation/Cloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ public static function configureUnpooledPostgresConnection(Application $app): vo

if (str_contains($host, 'pg.laravel.cloud') &&
str_contains($host, '-pooler')) {
$app['config']->set(
'database.connections.pgsql.options',
array_merge(
$app['config']->get('database.connections.pgsql.options'),
[PDO::ATTR_EMULATE_PREPARES => true],

Check failure on line 83 in src/Illuminate/Foundation/Cloud.php

View workflow job for this annotation

GitHub Actions / Source Code

Access to constant ATTR_EMULATE_PREPARES on an unknown class Illuminate\Foundation\PDO.
),
);

$app['config']->set(
'database.connections.pgsql-unpooled',
array_merge($app['config']->get('database.connections.pgsql'), [
Expand Down

0 comments on commit 2259338

Please sign in to comment.