couchbase / couchbase/couchbase-php-client
Unexpected Warning Messages When Using PHP SDK v4
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 7
- Forks
- 13
- Avg merge
- 6d 10m
- Merged PRs (30d)
- 2
Description
After connecting to Couchbase server using PHP SDK v4, unexpected warning messages are generated when performing an operation.
Steps to reproduce the issue: https://github.com/deminy/couchbase-issues/tree/couchbase4/issue-7
Test code used:
<?php
/**
* This script generates unexpected warning messages when Couchbase logging level is set to "warning".
*
* After connecting to Couchbase server using PHP SDK v4, unexpected/confusing warning messages are generated when
* performing an operation.
*
* Usage:
* docker compose exec -ti client php -d couchbase.log_level=warning ./test.php
*/
declare(strict_types=1);
require_once $_SERVER['HOME'] . '/.composer/vendor/autoload.php';
use Couchbase\Cluster;
use Couchbase\ClusterOptions;
$options = new ClusterOptions();
$options->credentials('username', 'password');
$cluster = new Cluster('couchbase://server?network=default', $options);
$cluster->bucket('test')->defaultCollection()->removeMulti(['foo']);
echo 'Done.', PHP_EOL;
Above test script generates following two unexpected warning messages when Couchbase logging level is set to "warning":
{
"level": "warning",
"message": "DNS SRV query returned 0 records for \"server\", assuming that cluster is listening this address",
"thread_id": 154,
"time": "2025-07-28 21:18:16.771942837.942837"
}
{
"level": "warning",
"message": "[4a271e-43b0-ef42-b898-15eb592343bf50/test] unable to find connected session with GCCCP support, retry in 2500ms",
"thread_id": 154,
"time": "2025-07-28 21:18:16.783836753.836753"
}
These warnings are unexpected and may confuse developers, even though they do not affect the script's functionality.
Possible adjustments to avoid the confusion:
- Change the logging level to "info" for these messages.
- Update the warning messages to explicitly indicate that they are non-critical and do not affect functionality.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reproduction at https://github.com/deminy/couchbase-issues/tree/couchbase4/issue-7 with the PHP script and warning log level shown in the issue. Trace where the DNS SRV and GCCCP messages are emitted; done means the expected operation still succeeds without these non-critical conditions being reported as unexpected warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100