Skip to content
Advertisement

composer is ignoring installer-paths configuration

I’m try using CakePHP for the first time with composer, but I have some problems.

I have this 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"]
    }
  }  
}

When I run composer install (or update) --prefer-dist, everything works except smottt/wideimage.

This package is being installed in the /Vendor folder instead /app/Vendor, so, installer-paths was ignored.

Advertisement

Answer

From the 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.

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.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement