Installers

composer/installers image

Installers stats

Downloads
76.9M
Stars
1,408
Open Issues
24
Forks
420

View on GitHub →

A multi-framework Composer library installer

Summary of composer/installers Laravel Package

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 in composer.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:

  1. Define Package Type: Add the package type in your package’s composer.json:

    {
    "type": "cakephp-plugin"
    }
  2. Set Custom Installation Paths: Customize where packages are installed:

    {
    "extra": {
    "installer-paths": {
    "your/custom/path/{$name}/": ["type:wordpress-plugin"]
    }
    }
    }
  3. Naming Custom Installations: For specific naming conventions during installation:

    {
    "extra": {
    "installer-name": "CustomName"
    }
    }
  4. 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.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Composer Installers Related Articles

Building Package Installers image

Building Package Installers

Read article
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
DreamzTech logo

DreamzTech

Hire 6-10+ Yrs. experienced skilled Laravel Developers from DreamzTech. We ensure NDA protected, 100% quality delivery. Contact Us & Discuss Your Need.

DreamzTech
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
LoadForge logo

LoadForge

Scalable load testing for web apps & APIs. Simulate real-world traffic and identify breaking points and performance limits with powerful, scalable load tests designed for Laravel.

LoadForge
The Certification of Competence for Laravel logo

The Certification of Competence for Laravel

A community-driven, proctored assessment across 4 levels designed to validate real-world Laravel knowledge, from Junior to mastery-level Artisan. Official Vue.js, Official Nuxt, Angular, React, JS certifications also available.

The Certification of Competence for Laravel
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $9500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises