php – composer忽略了installer-paths配置

前端之家收集整理的这篇文章主要介绍了php – composer忽略了installer-paths配置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我第一次尝试使用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/"
        }
    }
}

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

原文链接:https://www.f2er.com/php/133273.html

猜你在找的PHP相关文章