Skip to content

Clean up filesystem function signatures - #931

Merged
kocsismate merged 14 commits into
php:masterfrom
thinkverse:fix-fs-funcs
Dec 23, 2021
Merged

kocsismate merged 14 commits into
php:masterfrom
thinkverse:fix-fs-funcs

Conversation

@thinkverse

Copy link
Copy Markdown
Contributor

This PR intends to clean up the function signatures for the filesystem functions. Some are missing default initializers, mostly the nullable parameters, and some have missing return types. copy though for instance had the wrong parameter names, in the documentation, they are $source and $dest respectively but the actual names - found in the php-src, are $from and $to.

This PR will be squashed down to one commit before it is ready to merge.

@thinkverse thinkverse changed the title [Draft] Clean up filesystem function signatures Clean up filesystem function signatures Sep 8, 2021
@thinkverse
thinkverse marked this pull request as ready for review September 8, 2021 04:03
@thinkverse

Copy link
Copy Markdown
Contributor Author

I'm pretty sure I got all mismatched signatures, if I missed any let me know. 👍

@Girgias

Girgias commented Sep 8, 2021

Copy link
Copy Markdown
Member

I'm surprised this isn't caught by #903, @kocsismate any idea why?

@kocsismate

Copy link
Copy Markdown
Member

I'm surprised this isn't caught by #903, kocsismate any idea why?

Yes, I only added a subset of all the changes, and I left most of the functions in ext/standard untouched until the majority of my outstanding PRs are merged.

@Girgias

Girgias commented Sep 8, 2021

Copy link
Copy Markdown
Member

Okay that explains that then. :-)

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't marked all the union type issues as it is a recurrent issue.

The var name changes in the examples are dubious IMHO.

Comment thread reference/filesystem/functions/fgets.xml Outdated
Comment thread reference/filesystem/functions/copy.xml Outdated
Comment thread reference/filesystem/functions/fgets.xml
Comment thread reference/filesystem/functions/file-get-contents.xml Outdated
Comment thread reference/filesystem/functions/touch.xml
Comment thread reference/filesystem/functions/fwrite.xml
Comment thread reference/filesystem/functions/fwrite.xml Outdated

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still the minor complaint about using $fp but that's fine.

Comment thread reference/filesystem/functions/touch.xml Outdated
Comment thread reference/filesystem/functions/touch.xml Outdated
@thinkverse
thinkverse requested review from Girgias and cmb69 October 20, 2021 07:00

@kocsismate kocsismate left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits. Please fix these, and then finally we can merge this PR :)

Comment thread reference/filesystem/functions/unlink.xml
Comment thread reference/filesystem/functions/umask.xml
Comment thread reference/filesystem/functions/touch.xml Outdated
Comment thread reference/filesystem/functions/rmdir.xml
Comment thread reference/filesystem/functions/fwrite.xml
Comment thread reference/filesystem/functions/file-get-contents.xml
Comment thread reference/filesystem/functions/file-get-contents.xml
Comment thread reference/filesystem/functions/fwrite.xml Outdated
Co-authored-by: Máté Kocsis <kocsismate@woohoolabs.com>

@kocsismate kocsismate left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge this tomorrow, unless someone else spots any new issues.

@kocsismate
kocsismate merged commit ea62fb8 into php:master Dec 23, 2021
@thinkverse
thinkverse deleted the fix-fs-funcs branch December 23, 2021 14:54
tiffany-taylor pushed a commit to tiffany-taylor/doc-en that referenced this pull request Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants