Skip to content

feat: pass settings via interface to the client #1538

feat: pass settings via interface to the client

feat: pass settings via interface to the client #1538

Triggered via pull request August 8, 2025 15:48
@simPodsimPod
synchronize #301
settings
Status Success
Total duration 1m 4s
Artifacts

infection.yml

on: pull_request
Infection
58s
Infection
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Infection: src/Client/PsrClickHouseClient.php#L85
Escaped Mutant for Mutator "Catch_": @@ @@ { try { return $this->selectWithParams($query, params: [], outputFormat: $outputFormat, settings: $settings); - } catch (UnsupportedParamValue|UnsupportedParamType) { + } catch (UnsupportedParamType) { absurd(); } }
Infection: src/Client/PsrClickHouseClient.php#L71
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ } public function executeQueryWithParams(string $query, array $params, SettingsProvider $settings = new EmptySettingsProvider()): void { - $this->executeRequest($this->sqlFactory->createWithParameters($query, $params), params: $params, settings: $settings); + } public function select(string $query, Format $outputFormat, SettingsProvider $settings = new EmptySettingsProvider()): Output {
Infection: src/Client/PsrClickHouseAsyncClient.php#L123
Escaped Mutant for Mutator "NullSafeMethodCall": @@ @@ return $response; } return $processResponse($response); - }, fn() => $this->sqlLogger?->stopQuery($id)); + }, fn() => $this->sqlLogger->stopQuery($id)); } }
Infection: src/Client/PsrClickHouseAsyncClient.php#L111
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ $id = uniqid('', true); $this->sqlLogger?->startQuery($id, $sql); return Create::promiseFor($this->asyncClient->sendAsyncRequest($request))->then(function (ResponseInterface $response) use ($id, $processResponse) { - $this->sqlLogger?->stopQuery($id); + if ($response->getStatusCode() !== 200) { throw ServerError::fromResponse($response); }
Infection: src/Client/PsrClickHouseAsyncClient.php#L104
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ { $request = $this->requestFactory->prepareSqlRequest($sql, new RequestSettings($this->defaultSettings, $settings), new RequestOptions($params)); $id = uniqid('', true); - $this->sqlLogger?->startQuery($id, $sql); + return Create::promiseFor($this->asyncClient->sendAsyncRequest($request))->then(function (ResponseInterface $response) use ($id, $processResponse) { $this->sqlLogger?->stopQuery($id); if ($response->getStatusCode() !== 200) {
Infection: src/Client/Http/RequestFactory.php#L65
Escaped Mutant for Mutator "ConcatOperandRemoval": @@ @@ { $query = http_build_query($requestSettings->settings + $additionalOptions, '', '&', PHP_QUERY_RFC3986); if ($this->uri === null) { - $uri = $query === '' ? '' : '?' . $query; + $uri = $query === '' ? '' : '?'; } else { $uriQuery = $this->uri->getQuery(); try {
Infection: src/Client/Http/RequestFactory.php#L65
Escaped Mutant for Mutator "Ternary": @@ @@ { $query = http_build_query($requestSettings->settings + $additionalOptions, '', '&', PHP_QUERY_RFC3986); if ($this->uri === null) { - $uri = $query === '' ? '' : '?' . $query; + $uri = $query === '' ? '?' . $query : ''; } else { $uriQuery = $this->uri->getQuery(); try {
Infection: src/Client/Http/RequestFactory.php#L65
Escaped Mutant for Mutator "ConcatOperandRemoval": @@ @@ { $query = http_build_query($requestSettings->settings + $additionalOptions, '', '&', PHP_QUERY_RFC3986); if ($this->uri === null) { - $uri = $query === '' ? '' : '?' . $query; + $uri = $query === '' ? '' : $query; } else { $uriQuery = $this->uri->getQuery(); try {
Infection: src/Client/Http/RequestFactory.php#L65
Escaped Mutant for Mutator "Concat": @@ @@ { $query = http_build_query($requestSettings->settings + $additionalOptions, '', '&', PHP_QUERY_RFC3986); if ($this->uri === null) { - $uri = $query === '' ? '' : '?' . $query; + $uri = $query === '' ? '' : $query . '?'; } else { $uriQuery = $this->uri->getQuery(); try {
Infection: src/Client/Http/RequestFactory.php#L39
Escaped Mutant for Mutator "LogicalAnd": @@ @@ /** @throws InvalidArgumentException */ public function __construct(private ParamValueConverterRegistry $paramValueConverterRegistry, private RequestFactoryInterface $requestFactory, private StreamFactoryInterface $streamFactory, UriFactoryInterface|null $uriFactory = null, UriInterface|string $uri = '') { - if ($uriFactory === null && $uri === '') { + if ($uriFactory === null || $uri === '') { $uri = null; } elseif (is_string($uri)) { if ($uriFactory === null) {