Skip to content

Commit 8f692a6

Browse files
committed
🐛 fix(cache): 跳過內部類別或沒有檔案的類別
* 在 `SnapshotClassFinderComputedCache` 中新增檢查,以跳過內部類別或沒有檔案的類別。 * 確保在 Windows 環境下正常化檔案名稱,避免潛在的問題。
1 parent a7cf0d9 commit 8f692a6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Discovery/Cache/SnapshotClassFinderComputedCache.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ private function entries(
116116
foreach ($classFinder as $classReflection) {
117117
$filename = $classReflection->getFileName();
118118

119+
// Skip internal classes or classes without a file
120+
if ($filename === false) {
121+
continue;
122+
}
123+
119124
// Normalize filename to avoid issues on Windows.
120125
$normalizedFilename = str_replace('\\', '/', $filename);
121126

0 commit comments

Comments
 (0)