Skip to content

Commit 214bcb0

Browse files
committed
Fixes conflict between namespace prefix and target directory structure
1 parent a1b0d9f commit 214bcb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Util/AutoloaderUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function getPathForFutureClass(string $className)
4646
// lookup is obviously modeled off of Composer's autoload logic
4747
foreach ($classLoader->getPrefixesPsr4() as $prefix => $paths) {
4848
if (0 === strpos($className, $prefix)) {
49-
return $paths[0].'/'.str_replace('\\', '/', str_replace($prefix, '', $className)).'.php';
49+
return $paths[0].'/'.str_replace('\\', '/', substr($className, strlen($prefix))).'.php';
5050
}
5151
}
5252

0 commit comments

Comments
 (0)