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
Invalid SoapClient::__doRequest() signature #6901
Comments
Ouch, tough one. This stub is not version dependant so we can't just replace int to bool without messing with lower version. We could allow both int and string but we would not be able to see errors both in older and newer versions. I'm not sure why we have a stub for this instead of just relying on the CallMap. I guess removing this method from the stub and fixing types directly in the CallMap could work. Could you try to push a PR doing that and we'll see if it pass? |
Hello @orklah, I tried removing the stub method and all tests seems to pass. However, If I run that version of psalm on my PHP80 repo, I get errors like:
So I guess that doesnt fix it? Or do I have to do anything special in the code for that new stub to get picked up? |
Yeah you should also make a few changes in callmaps: CallMap contains current types and then CallMap_XX_delta are delta files in order to know which version changed what. So you should change SoapClient::__doRequest on CallMap.php and CallMap_80_delta See https://psalm.dev/docs/contributing/editing_callmaps/ for more info on how to edit those |
That does the trick indeed! |
@orklah, I just noticed that the return type is invalid as well. It is |
The return type is the first element of the array in the callmap, just before the parameters (that are named). Should be easy to change :) |
The stubs indicate that the
$one_way
variable is an integer.Since PHP 8.0 this is a bool.
psalm/stubs/soap.phpstub
Lines 261 to 268 in 2d0758a
See https://www.php.net/manual/en/soapclient.dorequest.php
The text was updated successfully, but these errors were encountered: