timonkreis/composer-package-paths

There is no license information available for the latest version (1.1.0) of this package.

Composer plugin to configure paths for composer package types.

1.1.0 2020-07-18 21:23 UTC

This package is auto-updated.

Last update: 2024-04-08 16:07:21 UTC


README

Composer plugin to configure paths for composer package types.

To set package paths, add configuration of package types and paths to your composer.json:

...
"extra": {
    "package-paths": {
        "[package-type]": "custom/path/{$vendor}/{$name}"
    }
}
...

The [package-type] has to match the type of the composer package.

Alternatively, you can add paths for vendor namespaces or even single packages:

...
"extra": {
    "package-paths": {
        "my-vendor/*": "vendor/path/{$vendor}/{$name}",
        "my-vendor/my-package": "vendor/path/{$vendor}/{$name}"
    }
}
...

The priority is as follows:

  1. Check if the package is referenced directly by package name ([vendor]/[name]).
  2. Check if the package namespace is referenced ([vendor]/*).
  3. Check if the package type is referenced ([package-type]).

Possible variables

Variable: Description:
{$vendor} Vendor name of the package.
{$name} Package name (after vendor name).