Skip to content

Commit 68a524c

Browse files
committed
#133 : fix to try to detect libpq version
1 parent 4bf2d74 commit 68a524c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Domain/Factory/LibraryVersionProviderTrait.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ private function getPrettyVersion(string $name): string
150150
$versionText = preg_replace('{^(\S+).*}', '$1', $constant);
151151
}
152152
break;
153+
case 'libpq':
154+
if ($constant = $this->constantExists('PGSQL_LIBPQ_VERSION')) {
155+
// @see https://github.com/php/php-src/commit/eae893bd3e426ea7f9fcf42b715efb1e49f055ab
156+
$versionText = $constant;
157+
}
158+
break;
153159
case 'sqlite3':
154160
if (method_exists('sqlite3', 'version')) {
155161
$meta = \SQLite3::version();

0 commit comments

Comments
 (0)