I implemented this installation plugin to install packages in custom (custom) folders that you can simply include in your .json composer, follow the example and tell me if you have more questions :)
https://github.com/mnsami/composer-custom-directory-installer
composer-order Catalog-installer
Composer plugin for installing various types of composition packages in user directories outside the default installation path of the default linker, which is located in the vendor folder.
This is not another composer-installer library for supporting package types other than composer, i.e. application .. etc. This is just to add the flexibility of installing composite packages outside the provider's folder. This package only supports composer package types,
https://getcomposer.org/doc/04-schema.md#type
Type of package. By default, the library is used.
Package types are used for custom installation logic. If you have a package that needs special logic, you can define a non-standard type. It can be a symfony suite, a wordpress plugin, or a typo3 module. These types will be specific to certain projects, and they will need to be provided with an installer capable of installing packages of this type.
How to use
- Include the composer plugin in the
composer.json require section:
"require":{ "php": ">=5.3", "mnsami/composer-custom-directory-installer": "1.1.*", "monolog/monolog": "*" }
- In the
extra section, specify the custom directory that you want to install in:
"extra":{ "installer-paths":{ "./monolog/": ["monolog/monolog"] }
adding the installer-paths , you tell the composer to install the monolog package inside the monolog folder in the root directory.
- As an added new feature, we added great flexibility in defining the boot directory in the same way as
composer/installers , in other words, you can use variables like {$vendor} and {$name} in the installer-path section:
"extra": { "installer-paths": { "./customlibs/{$vendor}/db/{$name}": ["doctrine/orm"] } }
above the doctrine/orm package will be installed in the root folder of your project under customlibs .
Note
Composer type: project not supported in this installer, since packages with the project type only make sense with application shells, such as symfony/framework-standard-edition , which are needed by another package.