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 (or update) --prefer-dist
时,除了 smottt/wideimage
之外,一切正常.
When I run composer install (or update) --prefer-dist
, everything works except smottt/wideimage
.
这个包被安装在 /Vendor
文件夹而不是 /app/Vendor
,所以,installer-paths 被忽略了.
This package is being installed in the /Vendor
folder instead /app/Vendor
, so, installer-paths was ignored.
推荐答案
来自 文档.
您不能使用它来更改任何包的路径.这只是适用于需要 composer/installers 并使用它处理的自定义类型.
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.
从您正在安装的 包 之一:p>
From one of the packages you're installing:
{
"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.
这篇关于作曲家正在忽略安装程序路径配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:作曲家正在忽略安装程序路径配置
基础教程推荐
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 在多维数组中查找最大值 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01