作曲家正在忽略安装程序路径的配置 [英] composer is ignoring installer-paths configuration
问题描述
我尝试通过composer首次使用CakePHP,但遇到了一些问题。
I'm try using CakePHP for the first time with composer, but I have some problems.
我有这个 composer.json
:
{
"name": "example.com.br",
"repositories": [
{
"type": "pear",
"url": "http://pear.cakephp.org"
}
],
"config": {
"vendor-dir": "Vendor/"
},
"require": {
"php": ">=5.4",
"pear-cakephp/cakephp": ">=2.4.3",
"cakephp/debug_kit": "2.2.*",
"smottt/wideimage": "dev-master"
},
"extra": {
"installer-paths": {
"app/Plugin/DebugKit": ["cakephp/debug_kit"],
"app/Vendor/Wideimage": ["smottt/wideimage"]
}
}
}
当我运行 composer install(或更新)--prefer-dist
时,除 smottt / wideimage
。
此软件包已安装在 / Vendor中
文件夹而不是 / app / Vendor
,因此,安装路径被忽略。
This package is being installed in the /Vendor
folder instead /app/Vendor
, so, installer-paths was ignored.
推荐答案
来自文档。
您不能使用此功能更改任何包的路径。这仅
适用于需要作曲者/安装者并使用其处理的
自定义类型的软件包。
You cannot use this to change the path of any package. This is only applicable to packages that require composer/installers and use a custom type that it handles.
从您要安装的软件包之一中:
{
"name": "smottt/wideimage",
"description": "An open-source PHP library for image manipulation. (With namespaces, PHP 5.3+)",
"homepage": "http://wideimage.sourceforge.net",
"type": "library",
"license": ["GPL-2.0","LGPL-2.1"],
"version": "11.02.19",
"autoload": {
"psr-0" : {
"WideImage" : "lib/"
}
}
}
因此,基本上,您要安装的软件包不支持自定义安装路径。
So basically the package you're trying to install doesn't support custom install paths.
这篇关于作曲家正在忽略安装程序路径的配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!