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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sandersander/composer-link

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

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

Adds ability to link local packages for development with composer

v0.7.3(2d ago)98457.9k↓21.6%7MITPHPPHP &gt;=8.2CI passing

Since Mar 30Pushed 2w 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 yesterday

READMEChangelog (10)Dependencies (37)Versions (30)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 link ../path/to/package-one ../path/to/package-two
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 unlink ../path/to/package-one ../path/to/package-two
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

61

—

FairBetter than 98% of packages

Maintenance98

Actively maintained with recent releases

Popularity51

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 98.7% 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 ~70 days

Recently: every ~32 days

Total

23

Last Release

2d ago

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

v0.4.0PHP &gt;=8.1

v0.7.0PHP &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 (78 commits)")[![aviramaz](https://avatars.githubusercontent.com/u/1309116?v=4)](https://github.com/aviramaz "aviramaz (1 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

[symfony/runtime

Enables decoupling PHP applications from global state

74798.8M1.0k](/packages/symfony-runtime)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M564](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2124.7M203](/packages/drupal-core-project-message)[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.

3014.6M26](/packages/vaimo-composer-patches)[phpro/grumphp-shim

GrumPHP Phar distribution

294.7M340](/packages/phpro-grumphp-shim)[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

576.1M124](/packages/automattic-jetpack-autoloader)

PHPackages © 2026

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