作曲家正在忽略安装程序路径配置

帕特里克·麦克尼尔

我第一次尝试在作曲家中使用CakePHP,但遇到一些问题。

我有这个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

该软件包而是安装在/Vendor文件夹中/app/Vendor,因此,安装程序路径被忽略。

达纳克

文档中

您不能使用它来更改任何包的路径。这仅适用于需要作曲者/安装者并使用其处理的自定义类型的软件包。

要安装软件包之一

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

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

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章