CakePHP / 2.6下载包含top-level composer.json
file:
{
"name": "cakephp/cakephp",
"description": "The CakePHP framework",
"type": "library",
"keywords": ["framework"],
"homepage": "http://cakephp.org",
"license": "MIT",
"authors": [
{
"name": "CakePHP Community",
"homepage": "https://github.com/cakephp/cakephp/graphs/contributors"
}
],
"support": {
"issues": "https://github.com/cakephp/cakephp/issues",
"forum": "http://stackoverflow.com/tags/cakephp",
"irc": "irc://irc.freenode.org/cakephp",
"source": "https://github.com/cakephp/cakephp"
},
"require": {
"php": ">=5.2.8",
"ext-mcrypt": "*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"cakephp/debug_kit" : "2.2.*"
},
"bin": [
"lib/Cake/Console/cake"
]
}
然而,当我运行composer install
时,东西安装在新创建的文件夹中,似乎不遵循CakePHP约定:
Plugin
代替plugins
vendor
代替vendors
......我最终得到了这个:
07/01/2015 12:41 <DIR> Plugin
07/01/2015 12:38 <DIR> plugins
07/01/2015 12:41 <DIR> vendor
07/01/2015 12:38 <DIR> vendors
我对这两种技术都很陌生(CakePHP和Composer)所以我想知道我是否遗漏了一些明显的东西。这是预期的行为吗?
答案 0 :(得分:1)
我使用&#34; extra&#34;解决了这个问题。和&#34;配置&#34;选项。在&#34;额外&#34;我把插件和我想要放置的地方放在&#34; config&#34;我告诉作曲家我的供应商目录是&#34; app / Vendor&#34;。
与以下composer.json
类似{
"name": "cakephp/cakephp",
"description": "The CakePHP framework",
"type": "library",
"keywords": ["framework"],
"homepage": "http://cakephp.org",
"license": "MIT",
"authors": [
{
"name": "CakePHP Community",
"homepage": "https://github.com/cakephp/cakephp/graphs/contributors"
}
],
"support": {
"issues": "https://github.com/cakephp/cakephp/issues",
"forum": "http://stackoverflow.com/tags/cakephp",
"irc": "irc://irc.freenode.org/cakephp",
"source": "https://github.com/cakephp/cakephp"
},
"require": {
"php": ">=5.3.0",
"ext-mcrypt": "*",
"php-amqplib/php-amqplib": "2.5.*",
"minishlink/web-push": "^1.4"
},
"require-dev": {
"cakephp/debug_kit": "^2.2.0",
"phpunit/phpunit": "3.7.38",
"cakephp/cakephp-codesniffer": "^1.0.0"
},
"extra": {
"installer-paths": {
"app/Plugin/DebugKit": ["cakephp/debug_kit"]
}
},
"config": {
"vendor-dir": "app/Vendor"
},
"bin": [
"lib/Cake/Console/cake"
]
}