pieceofcodero/symlink-composer-plugin

Composer plugin for creating symlinks to packages in custom directories. Supports type-based, vendor-based, and name-based matching with configurable paths.

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:composer-plugin

pkg:composer/pieceofcodero/symlink-composer-plugin

v0.2 2025-06-04 11:35 UTC

This package is auto-updated.

Last update: 2025-12-04 12:48:43 UTC


README

A Composer plugin that creates symlinks for specific packages according to defined criteria.

Installation

composer require pieceofcodero/symlink-composer-plugin

Configuration

Add a symlink-paths section to the extra section of your composer.json:

{
    "extra": {
        "symlink-paths": {
            "public/components/{$name}": ["vendor:some-vendor", "type:component"],
            "public/js/{$name}": "vendor:js-vendor"
        }
    }
}

Usage

The plugin automatically creates symlinks when packages are installed or updated.

Recreating all symlinks

If you need to recreate all symlinks (for example, after changing the configuration), use the dedicated command:

composer symlink-recreate-all

This command will recreate all symlinks according to your configuration.

Path Placeholders

The following placeholders are available for target paths:

  • {$name}: Package name without vendor (e.g., "package" from "vendor/package")
  • {$vendor}: Vendor name (e.g., "vendor" from "vendor/package")
  • {$package}: Full package name (e.g., "vendor/package")