[php-src] PR #23393: ext/pgsql: fix the class name casing of pg_close_stmt()'s connection
| From: | lacatoire | Date: | Thu, 20 Aug 2026 14:41:43 +0000 |
| Subject: | [php-src] PR #23393: ext/pgsql: fix the class name casing of pg_close_stmt()'s connection | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38025@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23393
Author: lacatoire
pg_close_stmt() declares its connection as Pgsql\Connection:
```php
function pg_close_stmt(Pgsql\Connection $connection, string $statement_name): PgSql\Result|false {}
```
The class is PgSql\Connection, declared that way a few lines below in the same stub and
spelled that way by the other thirty-one references in the generated arginfo. This was the only
Pgsql left in the extension.
Class name resolution is case-insensitive, so nothing breaks at runtime; what leaks is the
declaration. On builds where the function exists (libpq >= 17),
ReflectionParameter::getType() reports Pgsql\Connection for this one
function and PgSql\Connection for every other. The return type on the same line already
says PgSql\Result.
pgsql_arginfo.h is regenerated: one ZEND_ARG_OBJ_INFO line plus the stub
hash, and no Pgsql remains in the file.
The added test needs no server: it reads the declared types through Reflection, prints
pg_close_stmt() next to pg_connect_poll(), which takes the same
non-nullable typed connection, and checks both against the class name. It skips where
pg_close_stmt() is not compiled in.