Add a few more predis integration tests with different connection types #794
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.
Description
Closes #315 (original issue) .
Closes #479 (attempted fix, which was already fixed by #574)
This was previously fixed by #574. As I explored #315 and the fix, noticed the current fix leaves out a few rarely used connection types without host and port tags information, as they do not use the AbstractConnection, while still being single node configurations.
Not the end of the world, but fix was simple.
Also added tests for many other connection types that do not need extra integrations (live connections into a Redis instance) to initialize.
More detail:
This moves from checking on extending the abstract class, into checking on implementing thise single node connection interface. All but one one core connection (Webdis) uses the interface without extending the abstract class. Any custom connection a user can define could also fall under this, though this is again, a rare case.
This change focused on the original intent of #574. Avoids trying to get a connection's host and port from a Redis cluster, since these cluster might have more than one connections configured. These connection types all implement the AggregateConnectionInterface.
On the other hand, single server connections implement the NodeConnectionInterface, which is also implemented by the AbstractConnection.
The
NodeConnectionInterface
guarantees thegetParameter
method, which returns aParameterInterface
implementing object, which in turn guarantees for any getter methods that:See:
https://github.com/nrk/predis/blob/v1.1/src/Connection/ParametersInterface.php#L21-L32
and
https://github.com/nrk/predis/blob/v1.1/src/Connection/Parameters.php#L146-L151
Readiness checklist
Reviewer checklist