Skip to content

Latest commit

 

History

History
34 lines (29 loc) · 2 KB

all-available-configurations.md

File metadata and controls

34 lines (29 loc) · 2 KB

Composer - Shared Package Plugin

All available configurations

All these configuration should set in the extra shared-packageconfiguration key in your project composer.json.

  • vendor-dir (required) : your shared packages sources directory. This folder is used by the project Composer autoloader. Relative or absolute path are allowed.
    Note: you can use the environment variable COMPOSER_SPP_VENDOR_DIR to override the default value.
  • package-list : the shared packages list. You can pass the entire package name, or add the wildcard * in the name (e.g. bar/*). If you want to share all your project packages, set a package name to *.
  • symlink-dir : your symlinks container directory on your project (default: vendor-shared). Relative or absolute path are allowed.
  • symlink-base-path : the source base path for all of your symlinks. By default, it's the vendor-dir path, but you can override this configuration. It's useful if you use a Virtual Machine and if your dependency directory path is not the same on both machines. Relative or absolute path are allowed. If you choose to set a relative path, it should start from your project root directory (where your project composer.json file is located).
    Note: you can use the environment variable COMPOSER_SPP_SYMLINK_BASE_PATH to override the default value.
  • symlink-enabled : (boolean, default: true) enable or not the symlink directory creation process. Useful if you work directly with the sources directory and you don't want to have the symlink directory in your project.

Example

// composer.json (project)
{
    "extra": {
        "shared-package": {
            "vendor-dir": "/var/projects/composer-dependencies",
            "symlink-dir": "symlinks-folder",
            "symlink-base-path": "/home/www/projects/composer-dependencies",
            "symlink-enabled": true,
            "package-list": [
                "foo/bar",
                "bar/*",
                "*"
            ]
        }
    }
}