LionsAd / drupal_ti

Drupal - Travis Integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install a non-Drupal library in vendor/

claudiu-cristea opened this issue · comments

My module requires a library (in vendor) that is installed from the project composer in this way:

{
  "repositories": [
    {
      "type": "package",
      "package": {
        "name": "phpoffice/phpspreadsheet",
        "version": "0.0",
        "dist": {
          "url": "https://github.com/PHPOffice/PhpSpreadsheet/archive/develop.zip",
          "type": "zip"
        }
      }
    }
  ],
  "require": {
    "phpoffice/phpspreadsheet": "~0.0"
  },
  "autoload": {
    "psr-4": {
      "PhpOffice\\PhpSpreadsheet\\": "vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet"
    }
  }
}

I guess is easy to download and place the code in vendor/phpoffice/phpspreadsheet, but how to fix the autoload?

It expects the library to be in module/vendor and not Drupal's vendor? Because right now this works out of the box with Composer base contrib builds just fine.

I have a similar issue, when the library is defined as a custom repository it does not install.

I think it's closed by #110.