加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – composer忽略了installer-paths配置

发布时间:2020-12-13 22:40:43 所属栏目:PHP教程 来源:网络整理
导读:我第一次尝试使用Cake PHP与作曲家,但我有一些问题. 我有这个composer.json: { "name": "example.com.br","repositories": [ { "type": "pear","url": "http://pear.cakephp.org" } ],"config": { "vendor-dir": "Vendor/" },"require": { "php": "=5.4","p
我第一次尝试使用Cake PHP与作曲家,但我有一些问题.

我有这个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(或update)–prefer-dist时,一切都可以工作,除了smottt / wideimage.

此软件包正在/ Vendor文件夹而不是/ app / Vendor中安装,因此,将忽略installer-paths.

从 documentation.

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.

从您正在安装的packages之一:

{
    "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/"
        }
    }
}

因此,您尝试安装的软件包基本上不支持自定义安装路径.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读