Consistent method semantics and documentation#72
Merged
clue merged 7 commits intoreactphp:masterfrom Mar 7, 2017
Merged
Conversation
jsor
requested changes
Mar 6, 2017
Member
jsor
left a comment
There was a problem hiding this comment.
Minor typos. Awesome work otherwise 🥇
README.md
Outdated
|
|
||
| Note that this method should not be confused with the `end()` method. | ||
| Unlike the `end()` method, this method does not take care of any existing | ||
| buffers and simply discards an buffer contents. |
README.md
Outdated
| the buffer, then close it. | ||
| If this stream is a `DuplexStreamInterface`, you should also notice | ||
| how the readable side of the stream also implements a `close()` method. | ||
| In other words, afer calling this method, the stream MUST switch into |
src/ReadableStreamInterface.php
Outdated
| * $stream->close(); | ||
| * ``` | ||
| * | ||
| * Afer calling this method, the stream MUST switch into a non-readable |
src/ReadableStreamInterface.php
Outdated
| * | ||
| * If this stream is a `DuplexStreamInterface`, you should also notice | ||
| * how the writable side of the stream also implements a `close()` method. | ||
| * In other words, afer calling this method, the stream MUST switch into |
README.md
Outdated
| $stream->close(); | ||
| ``` | ||
|
|
||
| Afer calling this method, the stream MUST switch into a non-writable |
src/WritableStreamInterface.php
Outdated
| * will be received with the exact same framing the sender intended to send. | ||
| * In other words, many lower-level protocols (such as TCP/IP) transfer the | ||
| * data in chunks that may be anywhere between single-byte values to several | ||
| * dozens of Kilobytes. You may want to apply a higher-level protocol to |
README.md
Outdated
| will be received with the exact same framing the sender intended to send. | ||
| In other words, many lower-level protocols (such as TCP/IP) transfer the | ||
| data in chunks that may be anywhere between single-byte values to several | ||
| dozens of Kilobytes. You may want to apply a higher-level protocol to |
src/WritableStreamInterface.php
Outdated
| * $stream->end(); | ||
| * ``` | ||
| * | ||
| * Afer calling this method, the stream MUST switch into a non-writable |
src/WritableStreamInterface.php
Outdated
| * $stream->close(); | ||
| * ``` | ||
| * | ||
| * Afer calling this method, the stream MUST switch into a non-writable |
src/WritableStreamInterface.php
Outdated
| * | ||
| * If this stream is a `DuplexStreamInterface`, you should also notice | ||
| * how the readable side of the stream also implements a `close()` method. | ||
| * In other words, afer calling this method, the stream MUST switch into |
Member
Author
|
Thanks for spotting these, typos fixed and changes squashed |
jsor
approved these changes
Mar 6, 2017
WyriHaximus
approved these changes
Mar 7, 2017
This was referenced Mar 7, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Et voilà, consistent method semantics and documentation 🎉
This pretty much only adds consistent documentation for what is currently undocumented and implicitly assumed.
This should in fact not break any of the existing assumptions and as such should not be considered a BC break. Given that this current behavior was mostly underdocumented or undocumented, I'll mark this as a BC break just to be safe in case any implementation relies on undocumented features which might now be prohibited.