Skip to content

Commit 5e4d9ae

Browse files
committed
Fix #20 and windows path issue for vendor files
1 parent 8f911c6 commit 5e4d9ae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Manager.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ public function files()
5959
$fileName = $file->getBasename('.'.$file->getExtension());
6060

6161
if (Str::contains($file->getPath(), 'vendor')) {
62-
preg_match('/([^\/]*)\/([^\/]*)\/([^\/]*).php$/', $file->getRealPath(), $matches);
62+
$fileName = str_replace('.php', '', $file->getFileName());
6363

64-
return "{$matches[1]}::{$matches[3]}";
64+
$packageName = basename(dirname($file->getPath()));
65+
66+
return "{$packageName}::{$fileName}";
6567
} else {
6668
return $fileName;
6769
}

0 commit comments

Comments
 (0)