Skip to content

Commit 0c25e06

Browse files
ondrejmirtesclaude
andcommitted
Normalize paths in the signature parity check
The manifest stores forward-slash paths; on Windows the realpath()-derived location uses backslashes and every shadowed class was reported as living in the wrong file. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013j6ePxd1BobZkr8YVLnNet (cherry picked from commit 3656e5f)
1 parent f4e6cda commit 0c25e06

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎turbo-ext/tests/signature-parity.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ function visibility(ReflectionMethod $m): string
7373

7474
// the manifest must point at the file the class actually lives in
7575
// (bin/side-by-side.php parses that file's source as the PHP side)
76-
$actualFile = substr(realpath($twin->getFileName()), strlen(realpath($root)) + 1);
76+
// normalized to forward slashes: the manifest stores portable paths
77+
$actualFile = str_replace(DIRECTORY_SEPARATOR, '/', substr(realpath($twin->getFileName()), strlen(realpath($root)) + 1));
7778
if ($actualFile !== $entry['php']) {
7879
$problems[] = sprintf('lives in %s, but the manifest says %s — regenerate with bin/side-by-side.php --update-manifest', $actualFile, $entry['php']);
7980
}

0 commit comments

Comments
 (0)