diff --git a/src/ClassMapGenerator.php b/src/ClassMapGenerator.php index 31ef653..5966f86 100644 --- a/src/ClassMapGenerator.php +++ b/src/ClassMapGenerator.php @@ -152,7 +152,7 @@ public function scanPaths($path, ?string $excluded = null, string $autoloadType $filePath = $cwd . '/' . $filePath; $filePath = self::normalizePath($filePath); } else { - $filePath = Preg::replace('{(?addFromString('src/Foo.php', ' 'phar://'.$archive.'/src/Foo.php'], + ClassMapGenerator::createMap('phar://'.$archive.'/src') + ); + } finally { + unlink($archive); + } + } + public function testAmbiguousReference(): void { $tempDir = self::getUniqueTmpDirectory();