Skip to content

Commit 9ba468a

Browse files
LTSCommerceclaude
andcommitted
debug: add path diagnostics to rector-safe.php error message
Temporary diagnostic to identify why rector-migrate.php paths fail in CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1fc0031 commit 9ba468a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

configDefaults/generic/rector-safe.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@
8282
}
8383
}
8484
if (!isset($safeFunction)) {
85-
throw new Exception('Could not find safe function');
85+
$tried = implode("\n ", array_map(static fn(string $p): string => $p . ' [' . (file_exists($p) ? 'EXISTS' : 'MISSING') . '] realpath=' . (realpath($p) ?: 'false'), $paths));
86+
throw new \RuntimeException("Could not find safe function rector-migrate.php\n\n__DIR__: " . __DIR__ . "\n\nPaths tried:\n " . $tried);
8687
}
8788
$safeFunction($rectorConfig);
8889
$rectorConfig->cacheClass(MemoryCacheStorage::class);

0 commit comments

Comments
 (0)