phpstan-src
phpstan-src copied to clipboard
PHP 8.4 ext-dba function signatures
dba_* functions had their signature changed in PHP 8.4 to return a \Dba\Connection instance.
Please share phpstan.org/try with an error first.
https://phpstan.org/r/6ad959ee-2851-4447-bb1c-90a511f93445
Parameter #2 $handle of function dba_fetch expects resource, Dba\Connection|false given.
@kassner I think the right solution is to put dba_fetch\'1 key into old section in resources/functionMap_php83delta.php.
- This signature is deprecated in PHP 8.3.
- The problem is that PHPStan is thrown off by the extra variant. You could look for the root cause and fix it (the fact that information from phpstan/php-8-stubs is not used there), but the easy fix is to put
dba_fetch\'1key intooldsection inresources/functionMap_php83delta.php.
The problem here is that phpstan/php-8-stubs info is not applied to dba_fetch.
This pull request has been marked as ready for review.