Skip to content

Conversation

@takaram
Copy link
Contributor

@takaram takaram commented May 31, 2022

These 4 methods have optional parameters, delimiter, nullAs and fields.

  • PDO::pgsqlCopyFromArray
  • PDO::pgsqlCopyFromFile
  • PDO::pgsqlCopyToArray
  • PDO::pgsqlCopyToFile

However, PHPStan complains when the optional arguments are missing.
https://phpstan.org/r/3efb4fa2-ac60-4444-899a-963c7989a466

This PR fixes the issue.

@ondrejmirtes
Copy link
Member

I have this project https://github.com/phpstan/php-8-stubs that automatically extracts stubs from php-src and PHPStan uses those definitions.

It'd be really nice to merge these various PDO_*_Ext definitions from php-src into the PDO stub. Right now there's no special logic around that. Would you be interested in doing that? Thank you.

@ondrejmirtes ondrejmirtes merged commit 13d4bce into phpstan:1.7.x Jun 1, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@takaram takaram deleted the fix-pdo-pgsql-signature branch June 2, 2022 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants