Make last parameter of openssl_seal optional#329
Conversation
How would you test function signatures? It'd just duplicate information that's already in functionMap.php, and it wouldn't actually be the guarantee the signatures are correct :) |
|
You can add a test case in CallToFunctionParametersRuleTest, but I definitely don't want that for all the described functions in that file :) |
|
Thank you! |
|
Alright, I just tested this exact situation and found a couple more violations: d2f443c |
Yes, I agree and realise that - what to do for tests of things that are just "constant input data". The test criteria is that "the function signatures match correctly the signatures defined by the PHP documentation/spec". But the real implementation will probably be a nonsense comparison of the content of If there is somewhere that has an easily machine-readable-parseable "official specification" of all those functions, then a test could parse all that and check against |
This is notoriously messy. If it wasn't messy then we wouldn't need to manually maintain this functionMap at all :) |
Fixes issue phpstan/phpstan#3896
Which seemed to have been broken by #327
Where are the tests for this? It seems to be untested, so we won't know if there is a regression in this file of function signature definitions.