-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Created stubs for the OCI8 extension. #5701
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice (and courageous) work! :) I only have a cursory look yet, so I'll continue later.
@jensdenies Yes, I believe not many people can run these tests so it would be appreciated if you could share some of the failing ones. These are not even run in CI. |
@kocsismate Thanks for the kind words and your review. I've processed some of your feedback and replied to some of your comments. Some failing tests include: ext/oci8/tests/old_oci_close1.phpt (fatal TypeError instead of expected warning). These are just a few. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another batch of comments :)
@kocsismate I've fixed the things you requested. I also updated the oci8_statement.c file to use
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the penultimate review batch :)
Thanks @kocsismate, i committed the fixes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My part is done with the review. If the current issues get fixed, we can hand it over to @nikic :)
Thanks again @kocsismate. I committed the last fixes @nikic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not check this in detail, but looks sensible :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a couple of smaller issues
ext/oci8/oci8.stub.php
Outdated
|
||
function oci_lob_is_equal(OCI_Lob $lob_descriptor_first, OCI_Lob $lob_descriptor_second): bool {} | ||
|
||
function oci_lob_export(OCI_Lob $lob_descriptor, $path, int $start = UNKNOWN, int $length = UNKNOWN): bool {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the string
type of the $path
parameter is missing
ext/oci8/oci8.stub.php
Outdated
* @alias oci_lob_export | ||
* @deprecated | ||
*/ | ||
function ociwritelobtofile(OCI_Lob $lob_descriptor, $path, int $start = UNKNOWN, int $length = UNKNOWN): bool {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as before
@kocsismate Fixed, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a last full round of review, I found a few minor issues. When fixing them, please rebase your branch to current master (so that the stub file will have a hash + your ZPP fixes are there), and run the tests. If they pass, then I'll merge the PR :)
@kocsismate Hi, i applied the requested changes and i think i've rebased master. Did i do it correct? I've ran the tests and not all of them pass, but i dont think it's related to my changes,. |
@jensdenies The fixes look good! However, I don't think you rebased to current master, because there should be a hash in the beginning of the arginfo file now. That possibly means you have to fetch current master from the
P.S. You don't need --rebase if you have configured git to use rebase by default If you haven't done that before, you can set up the
|
…ated function entries.
Thanks @kocsismate, i think it worked. There's a hash in the file now. |
@jensdenies I've just merged your work! Congrats! As a follow-up, the |
Thanks @kocsismate for all your help! I noticed the oci_interna_debug function and emailed @cjbj about it. So i will make a new PR to remove that function, i’ll also make a PR to deprecate ocifetchinto, since i forgot it while deprecating the other aliases. |
Hi,
I noticed the OCI8 extension didn't have stubs yet, that's why i decided to try to add them. I went over the implementation of the functions and methods to determine the types, but it would be nice if someone could double check them.
I've ran the tests and about 78% passed, the ones that failed didn't seem to be related to my changes. I could be wrong, however, so it would be nice if someone could check whether the functions and classes still work as expected.
If i recall correctly, someone mentioned the addition of the "false" return type. Did the "false" return type make it into PHP8? If so, should i add return types for the functions which return false and something else?