Stubs for MongoDB\BSON\toPHP() function #5100
-
The second parameter of https://www.php.net/manual/en/function.mongodb.bson-tophp.php is optional, I remember reading somewhere that PHPStan was using a mix of stubs, one of them phpstorm-stubs, there the second parameter there is right: https://github.com/JetBrains/phpstorm-stubs/blob/master/mongodb/mongodb.php#L1904 So, in order to fix this, should I add a mongodb.stub in https://github.com/phpstan/phpstan-src/tree/master/stubs? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, PHPStan stub files are for overriding wrong PHPDocs only: https://phpstan.org/user-guide/stub-files This needs fixing in this file: https://github.com/phpstan/phpstan-src/blob/63f40f14102d5c9c0b148006a703d2f5d23c9ced/resources/functionMap.php#L6730 Please send a PR, thanks. |
Beta Was this translation helpful? Give feedback.
Hi, PHPStan stub files are for overriding wrong PHPDocs only: https://phpstan.org/user-guide/stub-files
This needs fixing in this file: https://github.com/phpstan/phpstan-src/blob/63f40f14102d5c9c0b148006a703d2f5d23c9ced/resources/functionMap.php#L6730
Please send a PR, thanks.