Closed (fixed)
Project:
Drupal core
Version:
9.2.x-dev
Component:
file system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Mar 2014 at 12:05 UTC
Updated:
5 Jul 2021 at 15:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fietserwinComment #2
sunComment #3
fietserwinLet's extend this issue to correct/improve/unify/deduplicate documentation on classes that implement this interface, see #2213241-35: Fully conform to PHP5.4 streamwrapper class.
Comment #4
fietserwinThe parent is in. Can we get this in as well? I have not much time this month, but if no one else steps in, I will try to come up with a patch.
Comment #17
quietone commentedClosed #2902424: Completing PhpStreamWrapperInterface inline documentation as a duplicate. Uploading the latest patch from there to here, adding credit.
Then review that patch based on the comment from Kirsten Pol in 2902424#16.
Comment #18
quietone commentedThe patch in #17 does address the issues raised in the duplicate in comment #16. That means that this is ready for review.
I do have a question. Why are we duplicating documentation that is the Php docs?
Comment #19
quietone commentedComment #20
kristen pol@quietone asked:
That's an excellent question :) I'm not sure. But, since that's what was being done, I reviewed based on that. Maybe it shouldn't have been done in the first place? Not sure what the protocol is for such things or who we should ask.
Comment #21
amber himes matzphpDoc is a API documenting standard and does not refer to a specific set of documentation, such as PHP core API documentation. We tend to see the more commonly used term "docblock".
I don't believe it's accurate to say we're duplicating documentation in PHP's docs in this patch. They are only referenced in
@seelines. This patch is rectifying the lack of any docblocks for the methods in PhpStreamWrapperInterface.I've updated the title and issue summary to use the word "docblock" in place of "phpdoc" to try and clarify this.
Comment #22
longwaveI agree this is necessary because PHP doesn't provide an interface itself here, although end users of this subsystem are expected to conform to the interface all the same. If we document them then IDE users that are developing stream wrappers will get helpful documentation about these methods,
As part of this patch we can also remove the duplicated (but less detailed) docblocks in LocalStream and replace them with @inheritdoc.
I don't think any of the "@see streamWrapper::" lines are useful as we don't have such a class in core, they seem to be referring to the original PHP example docs. We should either refer to methods on *this* interface or remove these.
Comment #23
quietone commentedThe task IS does say to copy the docs what is implemented and what is implemented is the PHP Stream Wrapper class. Also this review is clearly referred to the documentation for www.php.net.
I am confused. Maybe if I work on the patch it will make sense.
I have updated the patch with the suggestions in #22. I have also moved comments that were after the @return to the top part of the docblock.
No, still confused. :-)
Comment #24
longwaveLooking good, just a couple of points:
This change is out of scope (PHPStorm likely did this automatically).
Unsure what we should do to these references to streamWrapper, as they are from the original docs. I suppose we should just replace them with this interface?
This reference is more tricky because $context is expected to exist on the stream wrapper object, but interfaces can't define properties.
Comment #25
quietone commented1. Fixed
2. Yes, these are from the original docs. I changed them to PhpStreamWrapperInterface::
3. The only idea I had was to add a comment in the class doc bloc but I couldn't think of any text!
Comment #26
kristen polThanks for the update. I reviewed the interdiff and have some feedback:
PhpStreamWrapperInterfacechanges seem okay.I'm unclear why this was added.
Ditto.
#24.1 is referencing the code below but the interdiff has the above, so this confused me.
Comment #27
quietone commented@Kristen Pol, thnaks.
1. Yay!
2. I don't remember why I added that, removed now.
3. This time I really have removed all accidental format changes.
4. Ah, I must have been playing around with a test. It is removed.
Comment #28
quietone commentedYes, I forgot to run commit-code-check.
Comment #29
kristen polThanks for the update.
Comment #30
longwaveI don't have any better suggestions about the $context property, as this is copied from the PHP docs I don't think there is much else we can say or do. Other than the nits below this looks ready to go to me.
We don't usually use Markdown-style backticks in core, this is slightly different from the other instances of this note.
Same here, we should use double quotes probably.
And here
Comment #31
quietone commented1. Wasn't sure if you wanted double quotes here. I have just removed the back ticks.
2 and 3. Now use doube quotes..
Comment #32
quietone commentedComment #33
longwaveThanks, this looks good to go.
Comment #34
alexpottBackported to 9.2.x as this only changes documentation.
Committed and pushed ca2c3d48a3 to 9.3.x and 5831c967c7 to 9.2.x. Thanks!