-
Notifications
You must be signed in to change notification settings - Fork 66
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
Rename close() to quit() and use promises for quit() method #65
Conversation
For the reference: The method was renamed from |
src/ConnectionInterface.php
Outdated
* | ||
* @return void | ||
* @throws Exception if the connection is not initialized or already closed/closing | ||
* @return PromiseInterface Returns a Promise<true,Exception> |
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'd personally keep the "return" value as void
or is there a reason this now resolves with true
?
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.
Good point! Updated to resolve with a void value instead. I'll make sure to file a similar PR which makes sure ping()
also resolves with a void value instead of boolean true (refs #63).
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 PR renames the existing
close()
method toquit()
and uses promises for this method instead.This PR also includes relevant documentation and tests. The old
close()
method definition was somewhat inconsistent and under-documented.Builds on top of #64
Refs #4