我当前的文件夹结构: 作曲/ PluginInstaller.php
composer.json的内容:
{
"name": "zepluf/installer",
"type": "composer-installer",
"description": "Composer installer for ZePLUF addons.",
"homepage": "http://github.com/zepluf/installer",
"license": "custom",
"authors": [
{
"name": "Raine Ng",
"email": "vunguyen@rubikin.com",
"homepage": "http://rubikin.com"
}
],
"autoload": {
"psr-0": {
"Zepluf\\Composer": "Composer"
}
},
"extra": {
"class": "Zepluf\\Composer\\PluginInstaller"
},
"target-dir": "zepluf/Composer"
}
我希望将安装程序放入其中:
供应商/ zepluf /作曲/ PluginInstaller.php
问题是我不断得到:
致命错误:在phar:// C:/ Prog中找不到类'Zepluf \ Composer \ PluginInstaller' ramData /作曲/斌/ composer.phar / src目录/作曲/安装/ InstallerInstaller.php 在第102行
非常感谢任何指针
答案 0 :(得分:1)
假设PluginInstaller.php位于您的包的根目录,它应该像这样配置:
// ...
"autoload": {
"psr-0": {
"Zepluf\\Composer": ""
}
},
"extra": {
"class": "Zepluf\\Composer\\PluginInstaller"
},
"target-dir": "Zepluf/Composer"