-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fixes bug 75928 #3081
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
Fixes bug 75928 #3081
Conversation
@pslacerda Maybe we can modify some tests, like its alias |
@carusogabriel Modifying an existing test is problematic because this requires strict_types=1, but I agree that it would be good to add a (new) test for this change. |
It would be ideal if this change came with appropriate test(s) |
I agree! Until next monday I'll make some tests. Searching on github I found no usages of By the way function signatures are very neat on PHP source code, even if usage failure of macros occurs eventually. |
Tests done, was basically a copy of the one in the bug description. :-) I'm searching by the files My starting point was the manual in the web-php repo. The strategy is to look for strings with https://github.com/php/web-php/blob/master/manual/en/toc/funcref.inc By the way there are many already done testes in the documentation, for instance the Example 1 of http://php.net/manual/en/function.apc-add.php If they are already made I guess that we can run all that with and without This documentation testing will not always work, because examples like http://php.net/manual/en/function.scandir.php |
Merged as fddd7e3 into 7.1+ with some simplification to the test file. I can't answer your docs related questions, not really familiar with the infrastructure there. The docs are located at http://svn.php.net/viewvc/phpdoc/ (though edit.php.net might be more convenient for browsing), but I don't know if there's an easy way to extract the example codes. I think it might be more fruitful to run phpt tests with strict_types -- however, there are also many many tests that explicitly test invalid inputs, so the signal to noise ratio will probably not be great. |
Very nice, my first PHP contribution! And thank you for simplify the test. I'm doing my best to learn PHP internals and maybe contribute back and currently I'm very interested in testing in general. I adapted the However seems that most if not all tests of the few ones in ext with
This indicates that tests with I would say to put a If I want to edit tests to skipif in that case and run all the suite with and without |
About the docs, that repo is what I needed. Maybe some unofficial tests can be made with that. |
I just made some modifications enabling testing with Edit: fixed https://github.com/php/php-src/compare/master...pslacerda:experimental/strict_testing?diff=split $ ./run-tests.php -t ext/date/tests/timezone_transitions_get_variation3.phpt I imagine that such function |
This fixes
DateTimeZone::listIdentifiers
ensuring thatnull
is a valid parameter by callingZ_PARAM_STRING_EX
directly.