Download the PHP package devkit/composer-link without Composer
On this page you can find all versions of the php package devkit/composer-link. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download devkit/composer-link
More information about devkit/composer-link
Files in devkit/composer-link
Package composer-link
Short Description Link local Composer packages via path repositories. Composer plugin: `composer link`, `composer add`, `link-help`, `local-bootstrap`, `local-install`, and related commands.
License MIT
Informations about the package composer-link
Composer Link
Local package path overrides for Composer.
devkit-composer-link
Local path overrides for Composer dependencies, with a separate local manifest so your committed composer.json and composer.lock stay clean.
Package: devkit/composer-link
Why this exists
When you need to test package changes inside a real app, the usual workflow often requires:
- hand-edit root
composer.jsonrepositories - point dependencies at local folders
- remember to undo everything before committing
Composer Link stores local override state in dedicated local files, rebuilds managed path repositories, and keeps your team baseline untouched.
Prerequisites
- PHP 8.3+
- Composer 2.2+ (plugin allow-list support)
Install
Install in the consuming application (not in the library repo you are editing):
Allow the plugin (Composer 2.2+)
Approve the interactive prompt, or add this explicitly:
Run from project root
All commands should run from your application root (where the committed composer.json lives).
Use:
If the package is installed correctly, composer list will include:
link, add, unlink, promote, linked, refresh, link-doctor, local-bootstrap, local-install, link-help.
At a glance
| Command | In one sentence |
|---|---|
link |
Override an existing dependency to a local path. |
add |
Bootstrap a dependency from local path before it exists in committed manifest/registry. |
unlink |
Remove local override state and restore or remove requirement. |
promote |
Move a locally-managed package back to a published constraint. |
linked |
Show all packages currently managed by Composer Link. |
refresh |
Rebuild managed path repositories in local manifest from state file. |
link-doctor |
Verify local setup and ensure ignore rules/local files are correct. |
local-bootstrap |
Copy committed manifest/lock into local manifest/lock files. |
local-install |
Install using local manifest (COMPOSER=composer.local.json). |
link-help |
Print a concise command/arguments/options overview in terminal. |
Configuration
Composer Link reads optional config from root composer.json under extra.composer-link.
| Key | Role |
|---|---|
overrides_file |
Local state file with managed packages, paths, mode, constraints. |
local_composer_json |
Local Composer manifest used for path repositories and local update/install runs. |
Files and folders
Default local artifacts:
packages-local.json: plugin state (gitignore this).composer.local.json: local manifest (gitignore this).composer.local.lock: lockfile for local manifest (gitignore this).
Committed baseline files stay canonical:
composer.jsoncomposer.lock
Legacy note: composer.local-packages.json is read only as fallback when packages-local.json is missing/empty; next write persists to packages-local.json.
Command reference
Use composer help <command> for full option docs.
link — override existing dependency
Examples:
add — bootstrap new local dependency
Examples:
unlink — stop managing a package locally
If package was added via add, use --remove to remove requirement:
Useful flags:
--no-update--remove(required for bootstrap-mode removals)
promote — move to published constraint
Examples:
linked — show managed packages
Outputs package, mode (override/bootstrap), path, symlink behavior, constraint, and path status.
refresh — rebuild managed path repos
link-doctor — validate setup
Checks:
- local ignore block/files
- linked path existence
- count of plugin-managed path repositories in local manifest
local-bootstrap — create local manifest files
Copies committed composer.json (+ composer.lock if present) to local equivalents.
local-install — install via local manifest
Equivalent to:
Examples:
link-help — command summary in terminal
Typical workflows
Override a released package with local checkout
If local branch/version does not satisfy baseline constraint:
Bootstrap package before Packagist
Later switch to published dependency:
Version control and safety
Keep shared baseline committed:
composer.jsoncomposer.lock
Keep local override artifacts out of Git:
packages-local.jsoncomposer.local.jsoncomposer.local.lock
packages-local.json is Composer Link state only; Composer itself reads whichever manifest COMPOSER points to.
For local workflows:
Before merging release work, align committed manifest/lock with intended published constraints (via promote, unlink, or normal manifest edits).
Support
If this project saves you time and you want to support future updates:
License
MIT (see composer.json).
All versions of composer-link with dependencies
composer-plugin-api Version ^2.2
composer/semver Version ^3.4
symfony/console Version ^6.4|^7.0
symfony/filesystem Version ^6.4|^7.0
symfony/process Version ^6.4|^7.0