douqing0713 2018-11-03 02:08
浏览 648

第444行的文件/var/www/vendor/composer/ClassLoader.php中没有此类文件或目录

I wrote my first composer package, however when I tried to test it by adding to a Laravel project, I received the following error:

ErrorException: include(/var/www/vendor/composer/../xxx/register-com-client/src/RegisterServiceProvider.php): failed to open stream: No such file or directory in file /var/www/vendor/composer/ClassLoader.php on line 444

Here's the composer.json for my package:

{
"name": "xxx/register-com-client",
"description": "",
"type": "library",
"minimum-stability": "dev",
"require": {
    "php": ">=7.0"
},
"autoload": {
    "psr-4": {
        "xxx\\Register_com\\": "src/"
    }
},
"extra": {
    "laravel": {
        "providers": [
            "xxx\\Register_com\\RegisterServiceProvider"
        ]
    }
}

}

And in my laravel project, I'm calling one of the functions in my register-com-client like this:

$registerService = new RegisterService();
$response = $registerService->getDomainProductId($input['sld'], $input['tld']);

I linked to my package locally in my laravel project like this (in composer.json)

{
        "type": "path",
        "url": "/Users/dannixxxx/xxx/register-com-client",
        "options": {
            "symlink": true
        }
    }
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器