# Bug report PHPStan (1.6.2) incorrectly reports errors for `pg_query()` for **PHP 8.1**: It does not seam to be aware that `pg_query()` expects a `PgSql\Connection` object as the first parameter and returns a `PgSql\Result` object as of PHP 8.1. I have checked the PHP 8 stubs at https://github.com/phpstan/php-8-stubs/blob/main/stubs/ext/pgsql/pg_query.php but cannot spot an issue there as those signatures include the correct PHP 8.1 derivative. ### Code snippet that reproduces the problem function test(): \PgSql\Result|false { return \pg_query(\pg_connect(''), ''); } https://phpstan.org/r/e6aba2b0-e06c-4e46-835a-a1b1fbe294d3 ### Expected output No error messages
Bug report
PHPStan (1.6.2) incorrectly reports errors for
pg_query()for PHP 8.1:It does not seam to be aware that
pg_query()expects aPgSql\Connectionobject as the first parameter and returns aPgSql\Resultobject as of PHP 8.1. I have checked the PHP 8 stubs at https://github.com/phpstan/php-8-stubs/blob/main/stubs/ext/pgsql/pg_query.php but cannot spot an issue there as those signatures include the correct PHP 8.1 derivative.Code snippet that reproduces the problem
https://phpstan.org/r/e6aba2b0-e06c-4e46-835a-a1b1fbe294d3
Expected output
No error messages