prometheus_client_php icon indicating copy to clipboard operation
prometheus_client_php copied to clipboard

Implement URL/DSN parsing for redis connection string (or incorporate predis/predis bundle to handle redis connection)

Open pmcgoverncw opened this issue 2 years ago • 2 comments

Currently there is no way to use a URL/DSN to define redis connection parameters, which is problematic in applications that use bundles such as predis or SNC Redis, which allow redis connection parameter definition via a dsn.

This request is to implement an option to define redis connection parameters as either separate values (as it is now in this bundle) OR as a single DSN.

Example of URL parsing used by predis/predis: https://github.com/predis/predis/blob/main/src/Connection/Parameters.php#L69

pmcgoverncw avatar Dec 01 '21 17:12 pmcgoverncw

Another example is the snc/sncredisbundle dns parser: https://github.com/snc/SncRedisBundle/blob/master/DependencyInjection/Configuration/RedisDsn.php#L169

pmcgoverncw avatar Dec 01 '21 18:12 pmcgoverncw

Hey @pmcgoverncw,

good idea! If you want (and have time) feel free to submit a MR :)

LKaemmerling avatar Dec 02 '21 07:12 LKaemmerling