-
Notifications
You must be signed in to change notification settings - Fork 35
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
PHP 8.0 testcase failure #23
Comments
@ashnazg i think found the problem. i´ve done an It is a bug in the tests since it is written. In DB/tests/driver/16tableinfo.phpt Line 147 in 4efd340
The problem is, that $value == 0 is always true in PHP7 if $value is a string.So this test will always pass, if $value is a string, no matter what is written in $value .
This has changed in PHP8 https://www.php.net/releases/8.0/en.php#saner-string-to-number-comparisons So i think, this test was always not showing the correct result before PHP8, because it always passes if What do you think? I will do an PR in the next days. |
PR looks good to me... ok to close this issue once it merges. |
Testcase
tests/driver/16tableinfo.phpt
encounters a failure when run on PHP 8.0, as seen below. The behavior differences appear to be in how the queried table characteristics are interpreted byDB
. The paste below is the runtime output of the testcase... you can visually compare it to the--EXPECT--
section in the PHPT to see what's different.As best I can tell, some
flags
are interpreted differently on 8.0 as compared to PHP7 and PHP5, e.g.flags ... was 'not_null multiple_key group_by' but we expected 'not_null multiple_key'
while also some column characteristics show up differently, e.g.
type ... was 'varchar' but we expected 'string'
I thought at first that maybe the PHP 8.0 behavior should be different based on that test platform's database version (newer?) as compared to the PHP7 and PHP5 platforms, but I don't know that for sure.
@schengawegga , if you are able to research this testcase, see how it acts on your various PHP8 platforms. If you become convinced that the runtime behavior as seen below is correct, then I can adjust this testcase to only run itself against PHP7 and older... and create a sister testcase just for PHP8 and up, that is written to
--EXPECT--
these flag and type differences.RUNTIME OUTPUT FROM THE BUILD:
The text was updated successfully, but these errors were encountered: