Laravel Cloud is here! Zero-config managed infrastructure for Laravel apps. Deploy now.

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
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
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
Securing Laravel logo

Securing Laravel

The essential security resource for Laravel devs, covering everything you need to keep your apps secure. Sign up to receive weekly security tips and monthly in depth articles, diving deep into security concepts you need to know!

Securing Laravel
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
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
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell