PHPackages                             sandersander/composer-link - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. sandersander/composer-link

ActiveComposer-plugin

sandersander/composer-link
==========================

Adds ability to link local packages for development with composer

v0.7.0(2mo ago)94408.6k↓11.1%6[1 issues](https://github.com/SanderSander/composer-link/issues)MITPHPPHP &gt;=8.2CI passing

Since Mar 30Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/SanderSander/composer-link)[ Packagist](https://packagist.org/packages/sandersander/composer-link)[ RSS](/packages/sandersander-composer-link/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (26)Used By (0)

composer-link
=============

[](#composer-link)

[![phpunit](https://github.com/SanderSander/composer-link/actions/workflows/unit-tests.yml/badge.svg?branch=master)](https://github.com/SanderSander/composer-link/actions/workflows/unit-tests.yml/badge.svg?branch=master)[![Packagist Downloads](https://camo.githubusercontent.com/d3fedf3a73211a2f3f1f9ec8c0b98bff4b653c5e90443dc0a63cb6dc71b61432/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f53616e64657253616e6465722f636f6d706f7365722d6c696e6b)](https://camo.githubusercontent.com/d3fedf3a73211a2f3f1f9ec8c0b98bff4b653c5e90443dc0a63cb6dc71b61432/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f53616e64657253616e6465722f636f6d706f7365722d6c696e6b)

Adds ability to link local packages in composer for development.

This plugin won't alter your `composer.json` or `composer.lock` file, while maintaining the composer abilities to manage/upgrade your packages.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- Composer &gt;= 2.6

Installation
------------

[](#installation)

This plugin can be installed globally or per project

Globally

```
composer global require sandersander/composer-link

```

Per project:

```
composer require --dev sandersander/composer-link

```

Usage
-----

[](#usage)

The following three commands are made available by this plugin `link`, `unlink` and `linked`. When the plugin is installed globally you can prefix the commands with `global` as example `composer global linked`and install global packages.

To link a package you can use the `link` commands, you can also link a global package. When linked to a global package absolute paths are used, when using a relative path composer-link resolves it to the absolute path.

```
composer link ../path/to/package
composer global link ../path/to/package

```

It's also possible to use a wildcard in your path, note that this will install all packages found in the directory `../packages`If you don't want to link all the packages but only the ones originally installed you can pass the `--only-installed` flag.

```
composer link ../packages/*
composer link ../packages/* --only-installed

```

Composer link will automatically install/update the required packages from the linked package, you can prevent this behavior by adding the `--without-dependencies` flag.

When the `composer link` or `composer unlink` are used all packages defined in `require-dev` of the root package are installed by default, this can be prevented by using the `--no-dev` flag

To unlink the package you can use the `unlink` command

```
composer unlink ../path/to/package
composer unlink ../packages/*
composer global unlink ../path/to/package

```

You can also unlink all package with the following command

```
composer unlink-all

```

To see all linked packages in your project you can use the `linked` command

```
composer linked
composer global linked

```

Configuration
-------------

[](#configuration)

It is also possible to predefine linked packages in your `composer.json` file. This is useful for projects that always require certain local packages to be linked.

```
{
    "extra": {
        "composer-link": {
            "paths": [
                "../path-to-package"
            ]
        }
    }
}
```

The packages defined in `paths` will be automatically linked when running `composer install` or `composer update`. You can still use the `composer unlink` command to temporarily unlink these packages.

Development
-----------

[](#development)

The following tools are available for development. It's also possible to link this package to your global for testing changes.

```
composer run lint               # Lints all files
composer run test               # Runs unit tests
composer run phpmd              # Runs phpmd
composer run phpstan            # Runs phpstan
composer run test-integration   # Runs integration tests for linux, this requires docker

```

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance83

Actively maintained with recent releases

Popularity50

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~75 days

Recently: every ~9 days

Total

20

Last Release

84d ago

PHP version history (3 changes)v0.1.0PHP &gt;=7.4

v0.4.0PHP &gt;=8.1

v0.7.x-devPHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/913be94adc0a3ca4fe1c6054d26d54d01c288d55d3305d21325c18a4aead8377?d=identicon)[SanderSander](/maintainers/SanderSander)

---

Top Contributors

[![SanderSander](https://avatars.githubusercontent.com/u/6603255?v=4)](https://github.com/SanderSander "SanderSander (75 commits)")

---

Tags

composercomposer-pluginphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sandersander-composer-link/health.svg)

```
[![Health](https://phpackages.com/badges/sandersander-composer-link/health.svg)](https://phpackages.com/packages/sandersander-composer-link)
```

###  Alternatives

[humbug/box

Fast, zero config application bundler with PHARs.

1.3k801.5k69](/packages/humbug-box)[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[roots/wordpress-core-installer

A Composer custom installer to handle installing WordPress as a dependency

4115.6M19](/packages/roots-wordpress-core-installer)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
