1
votes

I've learned how to set a custom install-path for a composer package on the project side.

"extra": {
    "installer-paths": {
        "foobar": ["vendor/package"]
    }
}

However, I want to be able to set this dir name for this package on the package side, so in the composer.json file within my package repo. Placing the installer-path key there doesn't affect the installation dir and the package is installed in the default vendor/packagename dir.

How do you set the install path for a package within its own composer.json?

1

1 Answers

0
votes

It can be solved by adding installer-name to the extra key in the package's composer.json file.

"extra": {
   "installer-name": "foobar",
}