Skip to content

Commit a4aa5b9

Browse files
committed
Normalize path to Unix-style for Windows
1 parent 935137a commit a4aa5b9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Diff for: src/Instrument/FileSystem/Enumerator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function enumerate()
6161
$iterator = new \RecursiveIteratorIterator(
6262
new \RecursiveDirectoryIterator(
6363
$this->rootDirectory,
64-
\FilesystemIterator::SKIP_DOTS
64+
\FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS
6565
)
6666
);
6767

Diff for: src/Instrument/Transformer/WeavingTransformer.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,7 @@ private function saveProxyToCache($class, $child)
271271

272272
$cacheDir = $this->cachePathManager->getCacheDir() . $cacheDirSuffix;
273273
$relativePath = str_replace($this->options['appDir'] . DIRECTORY_SEPARATOR, '', $class->getFileName());
274-
$classSuffix = str_replace('\\', DIRECTORY_SEPARATOR, $class->getName()) . '.php';
275-
$proxyRelativePath = $relativePath . DIRECTORY_SEPARATOR . $classSuffix;
274+
$proxyRelativePath = str_replace('\\', '/', $relativePath . '/' . $class->getName() . '.php');
276275
$proxyFileName = $cacheDir . $proxyRelativePath;
277276
$dirname = dirname($proxyFileName);
278277
if (!file_exists($dirname)) {

0 commit comments

Comments
 (0)