-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
ArgumentCountError in fputcsv() #310
Comments
Thanks for reporting @snapshotpl, We will have to pin the phpdocs that we use for generation to a certain commit that contains the php8 docs and not the php8.1. |
@dbrekelmans we can surely pin to that, but wouldn't this make the library compatible with 8.0.* only? How would you deal with SemVer? And what about downstream libs, how could they pin against this lib? |
Hi @Jean85, yes that would be the case. It would require us to make a new minor for each php version. It's definitely not ideal. I think the ideal situation (in my opinion) would be to keep track of some sort of delta like phpstan and psalm do (example: https://github.com/phpstan/phpstan-src/blob/master/resources/functionMap_php80delta.php). This would be a big refactor though, which I personally don't have the time for at the moment, but if anyone is willing to try then I definitely want to encourage them! |
@dbrekelmans I would like to give it a try, but I'm not sure that I understood your suggestion... How would this work? Do you want to generate the functions conditionally using PHPStan as a source of truth? Also, PHPStan seems to be listing a lot more functions that we would want... We would still need to use the doc as a listing, and then use PHPStan as a primary source for signature. In the meantime, I've wrote #316 as a (temporary?) fix for this issue. |
@Jean85 Thanks for the PR, I will take a look!
Yes that is correct. I was too quick to think we might not need the docs since phpstan knows the return type, but of course we still need to find out from the docs if this is a case of "return false on error" I have outlined my thoughts in a new issue: #317, so we don't pollute this one :). |
Version: 2.0.0-alpha.3
PHP: 8.0
Documentation say:
by https://www.php.net/manual/en/function.fputcsv.php
The text was updated successfully, but these errors were encountered: