Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update various DB functions for more specific row counts #1116

Merged
merged 2 commits into from Mar 27, 2022

Conversation

Seldaek
Copy link
Contributor

@Seldaek Seldaek commented Mar 25, 2022

Found all these while working on doctrine/dbal#5334

resources/functionMap.php Outdated Show resolved Hide resolved
@@ -11535,7 +11535,7 @@
'sqlsrv_prepare' => ['resource|false', 'conn'=>'resource', 'sql'=>'string', 'params='=>'array', 'options='=>'array'],
'sqlsrv_query' => ['resource|false', 'conn'=>'resource', 'sql'=>'string', 'params='=>'array', 'options='=>'array'],
'sqlsrv_rollback' => ['bool', 'conn'=>'resource'],
'sqlsrv_rows_affected' => ['int|false', 'stmt'=>'resource'],
'sqlsrv_rows_affected' => ['int<-1,max>|false', 'stmt'=>'resource'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would assume this function will also return a numeric-string when the number is big enough.
it should have the same technical limitations then other *row_affected functions (even if it is not documented in the php-src manual)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even PDO does not document this, only MySQLi, and I suspect it's because it's a deeply PHP-integrated driver, so I think I'd rather leave these as is as I do not know.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hint. Lets see, maybe php/doc-en#1483 Is helpfull

@ondrejmirtes ondrejmirtes merged commit c610c27 into phpstan:1.5.x Mar 27, 2022
@ondrejmirtes
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants