[GIT-PULLS] [php-src] PR #23393: ext/pgsql: fix the class name casing of pg_close_stmt()'s connection

[email protected] (lacatoire)
Newsgroups php.git-pulls
Message-ID <5Qo8MZz8nquOVCJHrhlJYmcXxYmB2516Zd0QA9UeqHw@main.internal.php.net>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.