A multi-framework Composer library installer
composer/installers stats
- Downloads
- 76.9M
- Stars
- 1,408
- Open Issues
- 24
- Forks
- 420
composer/installers
Laravel Package
Summary of The composer/installers
package is a utility for PHP package authors that simplifies the installation of packages into the appropriate directory based on the specified package type. It is designed to work seamlessly with Composer and supports a variety of frameworks and content management systems.
Key Features:
- Automatic Installation: Automatically installs PHP packages into the correct directory based on the defined package type in
composer.json
. - Custom Install Paths: Allows users to define custom installation paths for packages using the
installer-paths
setting incomposer.json
. - Custom Install Names: Package authors can specify a custom name for the installation directory via the
installer-name
attribute. - Disabling Installers: Provides functionality to disable one or more installers when necessary, preventing conflicts with other installer scripts.
- Extensive Framework Support: Includes support for numerous frameworks and CMSs, with stable types indicated in bold. (e.g.,
cakephp-plugin
,drupal-core
,wordpress-plugin
).
Installation:
Install the package via Composer:
composer require composer/installers
Usage:
-
Define Package Type: Add the package type in your package’s
composer.json
:{"type": "cakephp-plugin"} -
Set Custom Installation Paths: Customize where packages are installed:
{"extra": {"installer-paths": {"your/custom/path/{$name}/": ["type:wordpress-plugin"]}}} -
Naming Custom Installations: For specific naming conventions during installation:
{"extra": {"installer-name": "CustomName"}} -
Disabling Specific Installers: To avoid conflicts by disabling certain installers:
{"extra": {"installer-disable": ["cakephp", "drupal"]}}
Notable Considerations:
- No Dynamic Package Types: The package does not support dynamic package types or paths that could potentially alter or delete important directories without user consent.
- Recommended Alternatives: For new projects under Composer 2.1+, consider using
Composer\InstalledVersions
for handling package installations to maintain cleaner vendor directories.
The composer/installers
package is essential for developers looking to streamline the setup process for various PHP frameworks and applications, ensuring packages are installed in the correct directories with minimal configuration.