-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add ftp_append to create a new file or append data to an existing file (RFC959) #2615
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
The signature: The signature is identical to ftp_put except for the optional argument $startpos. |
LGTM @sgolemon thoughts? It's a fairy self contained small feature |
All tests pass except for travis-ci "ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0". I don't see this is related to my changes. |
Another ping for @sgolemon. Can this go into 7.2? |
Note for merger: When merging into master the mode needs to be adjusted to be optional and default to binary. |
@nikic Why should the mode be made optional on this function when it is required on all the others? It looks like the arginfo should be changed here to the require 4 args instead of 3, unless I'm missing something? |
@tpunt I fix this |
@blar Oh right, now I see... |
Remove the unrelated changes to all the other arginfo structs, and I'll be fine with it. I'm not saying we can't also fix the arginfos, but that should be a separate diff. |
Specifically, the arginfo values are wrong, and it's a bug. So those fixes should be done on the earliest 7.x branch which contains incorrect values and merged forward from there (which is another good reason to have it in a separate diff) |
Okay, correction. The aginfos on PHP-7.2 do match their function implementations, so this diff, as it stands, is wrong. The arginfos shouldn't be updated without also updating the implementations. At that point the change becomes much less self-contained. At this point, I would say: Make the new function require the mode argument for consistency with the other ftp functions. Remove the changes to their arginfos, and plan to make mode optional in 7.3 |
@sgolemon The implementation of this PR as it stands now is for master (where the mode arguments are already optional). For PHP 7.2 this would be merged without the last commit and that commit would be applied for master only. |
Ah, that would explain why the arginfo stucts looked wrong on the website, but not in my checkout of 7.2 :D Thanks, @nikic |
Add ftp_append to create a new file or append data to an existing file (RFC959)