Commit fb604aab1d5 for php.net

commit fb604aab1d581b5d51057208ab921eb94cc5f466
Author: lacatoire <la.catoire@gmail.com>
Date:   Tue Aug 18 10:04:56 2026 +0200

    ext/pgsql: fix the class name casing of pg_close_stmt()'s connection

    The stub spelled it Pgsql\Connection, the only such spelling in the
    extension. Resolution is case-insensitive, but Reflection reported a
    class name that does not match the declared one.

    Close GH-23393

diff --git a/NEWS b/NEWS
index 78265622e7d..887ff5b3401 100644
--- a/NEWS
+++ b/NEWS
@@ -58,6 +58,10 @@ PHP                                                                        NEWS
     left busy for the next fetch, and rows delivered from a result another
     statement took over. (KentarouTakeda)

+- PGSQL:
+  . Fixed the class name casing of pg_close_stmt()'s connection parameter.
+    (lacatoire)
+
 - Phar:
   . Fixed Phar archives being automatically detected when ".phar" only occurs
     in a directory name or is not a filename extension in an included file's
diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php
index 52ddc3b3748..8c5a7f4c6d9 100644
--- a/ext/pgsql/pgsql.stub.php
+++ b/ext/pgsql/pgsql.stub.php
@@ -956,7 +956,7 @@ function pg_socket_poll($socket, int $read, int $write, int $timeout = -1): int
     function pg_set_chunked_rows_size(PgSql\Connection $connection, int $size): bool {}
 #endif
 #ifdef HAVE_PG_CLOSE_STMT
-    function pg_close_stmt(Pgsql\Connection $connection, string $statement_name): PgSql\Result|false {}
+    function pg_close_stmt(PgSql\Connection $connection, string $statement_name): PgSql\Result|false {}
 #endif
 }

diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h
index 63a1d185d53..974a6e9117c 100644
Binary files a/ext/pgsql/pgsql_arginfo.h and b/ext/pgsql/pgsql_arginfo.h differ
diff --git a/ext/pgsql/tests/pg_close_stmt_parameter_type.phpt b/ext/pgsql/tests/pg_close_stmt_parameter_type.phpt
new file mode 100644
index 00000000000..c9c6c4f40ad
--- /dev/null
+++ b/ext/pgsql/tests/pg_close_stmt_parameter_type.phpt
@@ -0,0 +1,22 @@
+--TEST--
+pg_close_stmt(): the connection parameter is typed like every other pgsql function
+--EXTENSIONS--
+pgsql
+--SKIPIF--
+<?php
+if (!function_exists('pg_close_stmt')) die('skip pg_close_stmt() requires libpq >= 17');
+?>
+--FILE--
+<?php
+
+foreach (['pg_close_stmt', 'pg_connect_poll'] as $function) {
+    $parameter = (new ReflectionFunction($function))->getParameters()[0];
+    printf("%-16s %s\n", $function, $parameter->getType());
+}
+
+var_dump((new ReflectionClass(PgSql\Connection::class))->getName());
+?>
+--EXPECT--
+pg_close_stmt    PgSql\Connection
+pg_connect_poll  PgSql\Connection
+string(16) "PgSql\Connection"