Add alternative to custom installers (#10149)

Taken from composer/installers readme
main
Rodrigo 3 years ago committed by GitHub
parent bced747ed3
commit 131d6ade5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,6 +13,16 @@ library.
In these cases you could consider creating a Custom Installer to handle your
specific logic.
## Alternative to custom installers with Composer 2.1+
As of Composer 2.1, the `Composer\InstalledVersions` class has a
[`getInstalledPackagesByType`](https://getcomposer.org/doc/07-runtime.md#knowing-which-packages-of-a-given-type-are-installed)
method which can let you figure out at runtime which plugins/modules/extensions are installed.
It is highly recommended to use that instead of building new custom
installers if you are building a new application. This has the advantage of leaving
all vendor code in the vendor directory, and not requiring custom installer code.
## Calling a Custom Installer
Suppose that your project already has a Custom Installer for specific modules

Loading…
Cancel
Save