我正在尝试使用基本代码和外部包来组织我的项目作为基础项目的插件。
我已经在packagist中注册了bundle,“composer.phar install”命令按预期工作。自动加载器也按预期工作,所以一切正常,但“php console doctrine:generate:entities ACSACSPanelDynHostBundle”命令根本不起作用。它返回下一条消息:
[RuntimeException]
Can't find base path for "ACSACSPanelDynHostBundle" (path: "/var/www/acspanel/vendor/acs/paneldynhost", destination: "/var/www/acspanel/vendor/acs/paneldynhost").
我尝试在composer.json中使用psr-4来定义命名空间,但它也不起作用。 我想知道在我的供应商包中使用控制台命令的正确方法是什么。
我的bundle composer.json的代码是:
{
"name": "acs/paneldynhost",
"description": "Dynhost service creation for ACSPanel",
"keywords": ["dynamic domain","acspanel"],
"type": "
"autoload": {
"psr-4": { "ACS\\ACSPanelDynHostBundle\\": "" }
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
}
}