ConnectionManager に probeReplicas() を追加 (Phase 5-1 サブ C-5) #49
ci.yml
on: push
Code Style
27s
Static Analysis
20s
Mutation Testing
2m 23s
Matrix: integration-tests
Matrix: tests
Annotations
1 error and 18 warnings
|
Code Style
Process completed with exit code 3.
|
|
Tests (PHP 8.5 / ubuntu-latest)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/cache@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Static Analysis
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/cache@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Integration (MariaDB 10.11)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/cache@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Code Style
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/cache@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Integration (MySQL 8.0)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/cache@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Tests (PHP 8.5 / windows-latest)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/cache@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Tests (PHP 8.5 / macos-latest)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/cache@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Mutation Testing
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/cache@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Mutation Testing:
src/Sloop/Database/ConnectionManager.php#L271
Escaped Mutant for Mutator "Coalesce":
@@ @@
$skipped = [];
foreach ($pool->replicas as $replica) {
if ($this->deadCache->isDead($replica->host, $replica->port ?? 0, $pool->name)) {
- $skipped[] = $replica->host . ':' . ($replica->port ?? '?') . ' → skipped (dead-cache)';
+ $skipped[] = $replica->host . ':' . ('?' ?? $replica->port) . ' → skipped (dead-cache)';
continue;
}
|
|
Mutation Testing:
src/Sloop/Database/ConnectionManager.php#L270
Escaped Mutant for Mutator "Coalesce":
@@ @@
$alive = [];
$skipped = [];
foreach ($pool->replicas as $replica) {
- if ($this->deadCache->isDead($replica->host, $replica->port ?? 0, $pool->name)) {
+ if ($this->deadCache->isDead($replica->host, 0 ?? $replica->port, $pool->name)) {
$skipped[] = $replica->host . ':' . ($replica->port ?? '?') . ' → skipped (dead-cache)';
continue;
|
|
Mutation Testing:
src/Sloop/Database/ConnectionManager.php#L156
Escaped Mutant for Mutator "ReturnRemoval":
@@ @@
$pool = $this->resolvePool($name);
if ($pool->replicas === []) {
- // No replicas configured → primary doubles as the read endpoint.
- return $this->getPrimaryConnection($name);
+
}
[$candidates, $errors] = $this->partitionByDeadCache($pool);
|
|
Mutation Testing:
src/Sloop/Database/Connection.php#L409
Escaped Mutant for Mutator "CastString":
@@ @@
// Defensive: unreachable under ERRMODE_EXCEPTION (contractual for open()),
// but tolerate callers that inject a PDO with a different error mode.
- $value = $statement === false ? '' : (string) $statement->fetchColumn();
+ $value = $statement === false ? '' : $statement->fetchColumn();
$this->serverVersion = $value;
$this->dialect = Dialect::detect($value);
|
|
Mutation Testing:
src/Sloop/Database/Connection.php#L398
Escaped Mutant for Mutator "ReturnRemoval":
@@ @@
private function ensureDialectDetected(): void
{
if ($this->dialect !== null) {
- return;
+
}
try {
|
|
Mutation Testing:
src/Sloop/Database/Connection.php#L384
Escaped Mutant for Mutator "GreaterThanNegotiation":
@@ @@
*/
private function sleepBackoff(int $backoffMs): void
{
- if ($backoffMs > 0) {
+ if ($backoffMs <= 0) {
usleep($backoffMs * 1000);
}
}
|
|
Mutation Testing:
src/Sloop/Database/Connection.php#L384
Escaped Mutant for Mutator "GreaterThan":
@@ @@
*/
private function sleepBackoff(int $backoffMs): void
{
- if ($backoffMs > 0) {
+ if ($backoffMs >= 0) {
usleep($backoffMs * 1000);
}
}
|
|
Mutation Testing:
src/Sloop/Database/Connection.php#L277
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$thrown = $this->rollbackAndNormalize($e);
if ($this->shouldRetry($thrown, $attempt, $maxAttempts)) {
- $this->sleepBackoff($backoffMs);
+
continue;
}
|
|
Mutation Testing:
src/Sloop/Database/Connection.php#L270
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
try {
$result = $callback($this);
- $this->pdo->commit();
+
return $result;
} catch (Throwable $e) {
|
|
Mutation Testing:
src/Sloop/Database/Connection.php#L251
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
Closure $callback,
IsolationLevel $level = IsolationLevel::Default,
int $maxAttempts = 1,
- int $backoffMs = 0,
+ int $backoffMs = 1,
): mixed {
if ($maxAttempts < 1) {
throw new LogicException('maxAttempts must be at least 1, got ' . $maxAttempts . '.');
|