We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f911c6 commit 5e4d9aeCopy full SHA for 5e4d9ae
src/Manager.php
@@ -59,9 +59,11 @@ public function files()
59
$fileName = $file->getBasename('.'.$file->getExtension());
60
61
if (Str::contains($file->getPath(), 'vendor')) {
62
- preg_match('/([^\/]*)\/([^\/]*)\/([^\/]*).php$/', $file->getRealPath(), $matches);
+ $fileName = str_replace('.php', '', $file->getFileName());
63
64
- return "{$matches[1]}::{$matches[3]}";
+ $packageName = basename(dirname($file->getPath()));
65
+
66
+ return "{$packageName}::{$fileName}";
67
} else {
68
return $fileName;
69
}
0 commit comments