Skip to content

Fix ocdb function signatures #4119

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

Merged
merged 1 commit into from
Jul 21, 2025
Merged

Conversation

VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet commented Jul 19, 2025

  • Every function returning a ressource can return false
    Currently there is an inconsistent behavior https://phpstan.org/r/6ef0920a-7e33-4c93-a08c-82a76e6a7557
    (In php 8.4 it returns ressource|false but in lower php version it returns false.)

  • odbc_do was forgotten in the functionMap_delta since it's an alias of odbc_exec

Copy link
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

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

Please do not update the parameter names. PHPStan already knows the correct ones thanks to https://github.com/phpstan/php-8-stubs. The only thing your change would do would be breaking baselines for people on PHP 7.x.

@VincentLanglet
Copy link
Contributor Author

Please do not update the parameter names. PHPStan already knows the correct ones thanks to phpstan/php-8-stubs. The only thing your change would do would be breaking baselines for people on PHP 7.x.

I simplified the PR

@ondrejmirtes ondrejmirtes merged commit 0c32152 into phpstan:2.1.x Jul 21, 2025
410 of 419 checks passed
@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
Development

Successfully merging this pull request may close these issues.

2 participants