Fix CI FPM worker config test

This commit is contained in:
Jeppe Bundgaard
2026-06-12 12:35:06 +02:00
parent aaec443140
commit 4a65b669bd
2 changed files with 23 additions and 4 deletions
@@ -1,10 +1,20 @@
<?php
function phpFpmWorkerConfigRepoRoot(): string
{
$configuredRoot = getenv('PLENO_REPO_ROOT_FOR_TESTS');
if (is_string($configuredRoot) && $configuredRoot !== '') {
return rtrim($configuredRoot, DIRECTORY_SEPARATOR);
}
$appRoot = defined('WD') ? WD : dirname(__DIR__, 3);
return dirname($appRoot, 3);
}
function phpFpmWorkerConfigRepoPath(string $relative): string
{
$appRoot = defined('WD') ? WD : dirname(__DIR__, 3);
return dirname($appRoot, 3) . DIRECTORY_SEPARATOR . str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $relative);
return phpFpmWorkerConfigRepoRoot() . DIRECTORY_SEPARATOR . str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $relative);
}
function phpFpmWorkerConfigValue(string $poolConfig, string $key): ?int