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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package composer-link

### **devkit-composer-link** Local packages. Fewer emotional incidents. [![PHP](https://img.shields.io/badge/PHP-8.5%2B-777BB4?logo=php&logoColor=white)](https://www.php.net/) [![Packagist](https://img.shields.io/packagist/v/devkit/composer-link?label=packagist&color=f28d1a&logo=packagist&logoColor=white)](https://packagist.org/packages/devkit/composer-link) [![License](https://img.shields.io/badge/license-MIT-22c55e)](LICENSE) [![Tests](https://github.com/stuarttodd-dev/devkit-composer-link/actions/workflows/php-ci.yml/badge.svg)](https://github.com/stuarttodd-dev/devkit-composer-link/actions) Package: **`devkit/composer-link`**

Table of Contents


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.json lives). The plugin only registers when devkit/composer-link is 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):

Buy Me a Coffee


Changelog

See CHANGELOG.md for release notes by tag.


License

MIT


All versions of composer-link with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package devkit/composer-link contains the following files

Loading the files please wait ...