Skip to content

Add upstream_driver option for CLIENT SETINFO upstream reporting#1645

Merged
vladvildanov merged 12 commits intopredis:mainfrom
vchomakov:feature/driver-info-v2
Mar 5, 2026
Merged

Add upstream_driver option for CLIENT SETINFO upstream reporting#1645
vladvildanov merged 12 commits intopredis:mainfrom
vchomakov:feature/driver-info-v2

Conversation

@vchomakov
Copy link
Copy Markdown
Contributor

@vchomakov vchomakov commented Feb 20, 2026

Summary

Adds upstream_driver option for CLIENT SETINFO LIB-NAME to allow upstream libraries to identify themselves, per Redis client guidelines.

Usage

// String
$client = new Client($params, [
    'upstream_driver' => 'laravel_v11.0.0',
]);
// → CLIENT SETINFO LIB-NAME predis(laravel_v11.0.0)

// Array (for multiple upstream drivers)
$client = new Client($params, [
    'upstream_driver' => ['laravel_v11.0.0', 'my-app_v1.0.0'],
]);
// → CLIENT SETINFO LIB-NAME predis(laravel_v11.0.0;my-app_v1.0.0)

When not specified, sends predis (current behavior unchanged).

Changes

  • src/Configuration/Option/UpstreamDriver.php (new) - option handler
  • src/Configuration/Options.php - register upstream_driver option
  • src/Configuration/OptionsInterface.php - add @property annotation
  • src/Configuration/Option/Connections.php - pass upstream driver to factory
  • src/Connection/Factory.php - builds library name with upstream info
  • Unit tests

@vchomakov vchomakov requested a review from a team as a code owner February 20, 2026 16:37
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 20, 2026

Coverage Status

coverage: 92.886% (-0.006%) from 92.892%
when pulling 26eac65 on vchomakov:feature/driver-info-v2
into 0850f2f on predis:main.

@vchomakov vchomakov force-pushed the feature/driver-info-v2 branch from 13a1364 to a3c5293 Compare February 20, 2026 16:45
Comment thread src/Connection/Factory.php Outdated
Comment thread src/Connection/Factory.php Outdated
Comment thread src/Connection/Factory.php Outdated
Comment thread src/Configuration/Options.php Outdated
@vchomakov vchomakov changed the title Add driver_info option for CLIENT SETINFO upstream reporting Add upstream_driver option for CLIENT SETINFO upstream reporting Feb 27, 2026
@vladvildanov vladvildanov merged commit 7388d91 into predis:main Mar 5, 2026
89 of 94 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants