Skip to content

Commit

Permalink
Fixed windows imported namespace names using "\"
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-deluna authored Oct 16, 2022
1 parent f6edcb7 commit 279982c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ContainerNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ public function importDirectory(string $directory, string $prefix = '', string $
// get the import name
$importName = trim($prefix . substr($file->getPathname(), strlen($directory), -(strlen($fileExtension))), '/');

// fix windows paths by always replacing "\" with "/"
$importName = str_replace("\\", "/", $importName);

// add the file
$importPaths[$importName] = $file->getPathname();
}
Expand Down

0 comments on commit 279982c

Please sign in to comment.