Add false as possible return value in stub for some get-type connection metadata methods#2527
Open
crocodele wants to merge 1 commit intophpredis:developfrom
Open
Add false as possible return value in stub for some get-type connection metadata methods#2527crocodele wants to merge 1 commit intophpredis:developfrom
crocodele wants to merge 1 commit intophpredis:developfrom
Conversation
…on metadata methods
Contributor
Author
|
@michael-grunder, @yatsukhnenko, any thoughts on this? |
Member
|
This should work for most of the methods but the ones that throw an exception don't technically return anything. Ideally, instead of returning false in the C code, we should use I am able to get a false return from these methods: $r->getDBNum() => false
$r->getHost() => false
$r->getPersistentID() => false
$r->getPort() => false
$r->getReadTimeout() => falseThese throw an exception: $r->getLastError() => exception
$r->getMode() => exception |
Contributor
Author
|
I'll wait for the release of 6.1.0, then I can change the methods to use |
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.
These methods return
falseif we're not connected. This should be reflected in the stub and arginfo.I'm sure that the same applies to many other methods as well, but here I've focused on the
get*()methods that return metadata about the connection.