提交 a296136a 编写于 作者: weixin_47267244's avatar weixin_47267244

修复极端情况下的 Imi\Util\Composer::getPathNamespaces() 返回结果

上级 9a3fc9b1
......@@ -52,10 +52,14 @@ abstract class Composer
*/
public static function getPathNamespaces(string $path): array
{
$realPath = realpath($path);
if (!$realPath)
{
return [];
}
$result = [];
foreach (self::getClassLoaders() as $classLoader)
{
$realPath = realpath($path);
foreach ($classLoader->getPrefixesPsr4() as $namespace => $namespacePaths)
{
foreach ($namespacePaths as $namespacePath)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册