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
Table of Contents
- Why this exists
- How it works
- Use case — test a package without wrecking main
- Prerequisites
- Install
- Commands at a glance
- Configuration
- Files and folders
- Commands
- Typical workflows
- Version control and safety
- Support
- Changelog
- License
Why this exists
You know the dance.
You need to change a package. You open the app’s composer.json, add a path repository, force a constraint, run Composer, test the thing, then carefully undo everything so main doesn’t ship ../Desktop/my-fork forever.
It’s fine once. It’s miserable every day.
Composer Link exists so you can point dependencies at real folders without hand-editing the committed manifest like it’s 2004 — and come back tomorrow with the same setup still waiting for you.
How it works
Composer Link is a Composer plugin installed in your app. It keeps two worlds separate:
| Shared with the team | Yours only (gitignore these) |
|---|---|
composer.json |
packages-local.json — link state |
composer.lock |
composer.local.json — local manifest with path repos |
composer.local.lock — lock for that local manifest |
Commands like link / add write to the local files. CI and teammates keep using the committed baseline. Locally you run composer local-install (or set COMPOSER=composer.local.json) so vendor/ matches your checkout.
When you’re done experimenting, unlink or promote puts things back on a published constraint — without the archaeology.
Run everything from your application root (where the committed
composer.jsonlives). The plugin only registers whendevkit/composer-linkis installed as a dependency of that app.
Use case — test a package without wrecking main
Imagine your app depends on your-vendor/payments: ^1.5. You’ve got a local checkout with a bugfix. You want to prove it in the real app before you tag.
Need @dev because the local branch doesn’t satisfy ^1.5?
Bootstrapping something that isn’t in the committed manifest yet?
Later, when it’s on Packagist:
A whole folder of checkouts? Scan them:
Prerequisites
| Requirement | Version |
|---|---|
| PHP | 8.5+ |
| Composer | 2.2+ (plugin allow-list) |
Install
Install in the consuming application (not inside the library you’re editing):
Allow the plugin (Composer 2.2+):
Then:
Commands at a glance
| Command | In one sentence |
|---|---|
link |
Override an existing dependency to a local path. |
add |
Bootstrap a local package that isn’t in the committed manifest yet. |
unlink |
Drop local override state; restore or remove the requirement. |
promote |
Switch a locally managed package to a published constraint. |
linked |
List everything Composer Link is currently managing. |
refresh |
Rebuild managed path repos from packages-local.json. |
link-doctor |
Check ignore rules, paths, and managed repositories. |
local-bootstrap |
Copy committed manifest/lock into local files. |
local-install |
composer install via composer.local.json. |
link-scan |
Discover matching packages in a directory and link / add them. |
link-help |
Terminal cheat sheet for arguments and options. |
Configuration
Optional settings live under extra.composer-link in the app’s root composer.json:
| Key | Role |
|---|---|
overrides_file |
Local state file (packages, paths, mode, constraints). |
local_composer_json |
Local Composer manifest used for path installs. |
Files and folders
Legacy note: if packages-local.json is missing/empty, composer.local-packages.json is still read as a fallback; the next write saves to packages-local.json.
Commands
Use composer help <command> for full flag docs.
link — override an existing dependency
add — bootstrap a new local dependency
unlink — stop managing a package locally
promote — move to a published constraint
linked — show managed packages
refresh — rebuild managed path repos
link-doctor — validate setup
Checks ignore rules, linked path existence, and managed path-repo count.
local-bootstrap — create local manifest files
local-install — install via local manifest
Equivalent to:
link-scan — discover and link a directory of checkouts
Each matching package is linked if it’s already in the committed manifest, or added as require-dev if it isn’t. The host project itself is skipped.
link-help — command summary in terminal
Typical workflows
Override a released package
Bootstrap before Packagist
Day-to-day local loop
Version control and safety
Commit the shared baseline. Keep local override artifacts out of Git.
packages-local.json is Composer Link state only — Composer itself reads whichever manifest COMPOSER points at.
Before merging release work, align committed composer.json / composer.lock with the published constraints the team should install (promote, unlink, or normal edits).
Support
If this project saves you time (and a few Friday-afternoon incidents):
Changelog
See CHANGELOG.md for release notes by tag.
License
MIT
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