Skip to content

Support Arbitrary Package Types #40

@mnsami

Description

@mnsami

Enable custom install paths for any Composer package type

Currently, the plugin only relocates packages of the default library type. Developers need the flexibility to specify custom installation directories for any package type (e.g., drupal-module, wordpress-plugin, or user‑defined types), similar to how oomphinc/composer-installers-extender leverages the official composer/installers logic.

Technical Issue & Solution:

Issue: Lack of support for non-library package types limits the plugin’s applicability in diverse frameworks.

Solution: Integrate with composer/installers to accept an additional configuration key (installer-types) in composer.json that lists extra package types the plugin should honor. At install time, resolve package types against this list and apply custom paths defined under installer-paths, reusing Composer’s token replacement logic ({$name}, {$vendor}, etc.).

Scope & Goal:

  • Extend the plugin’s core installer class to read an extra.installer-types array.
  • Update path-resolution logic to check each package’s type against both library and the configured extra types.
  • Goal: Allow mapping custom paths for all Composer package types, eliminating the need for a separate extender plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions