PHPackages                             folivoro/branch - 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. folivoro/branch

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

folivoro/branch
===============

Local package development for Composer without modifying composer.json

v0.0.2(2mo ago)037↑33.3%MITPHPPHP &gt;=8.1

Since Apr 26Pushed 2mo agoCompare

[ Source](https://github.com/folivoro/branch)[ Packagist](https://packagist.org/packages/folivoro/branch)[ RSS](/packages/folivoro-branch/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

[![Sloth Logo](https://raw.githubusercontent.com/folivoro/art/refs/heads/main/sloth-logo.svg)](https://folivoro.com)

Branch
======

[](#branch)

> Local package development for Composer without touching composer.json

The Problem
-----------

[](#the-problem)

When developing packages locally, you typically need to either:

1. **Modify `composer.json`** - Add path repositories, remember to remove them before committing
2. **Use `composer link`** - Extra setup, can get confused with global installs

Both approaches are error-prone and easy to forget.

The Solution
------------

[](#the-solution)

Drop a `branch-local.json` next to your `composer.json` and you're done. No modifications needed.

```
cd ~/projects/my-app
composer global require folivoro/branch
# Allow the plugin once in ~/.composer/composer.json
echo '{"config":{"allow-plugins":{"folivoro/branch":true}}}' | jq -s '.[0].config.allow-plugins += input.config.allow-plugins' ~/.composer/composer.json ~/.composer/composer.json > tmp && mv tmp ~/.composer/composer.json
```

Create `branch-local.json`:

```
{
    "acme/widget": "../acme-widget",
    "acme/gizmo": "/Users/dev/acme-gizmo"
}
```

Run `composer install` or `composer update`. That's it.

How It Works
------------

[](#how-it-works)

The plugin reads `branch-local.json` at `pre-install` and `pre-update` time and registers each path as a Composer `PathRepository`. It automatically extracts the version constraint from your `composer.json`'s `require` block and uses the lower bound, so your local branches can be named anything.

### Version Resolution

[](#version-resolution)

Consumer requireLocal version used`^1.0.0``1.0.0``~2.1.0``2.1.0``>=3.0.0``3.0.0``dev-main``dev-main`### Path Formats

[](#path-formats)

- **Relative**: `../my-package` (relative to working directory)
- **Absolute**: `/Users/dev/packages/my-package`

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

[](#installation)

### Global (Recommended)

[](#global-recommended)

```
composer global require folivoro/branch
```

Allow the plugin:

```
composer config --global allow-plugins.folivoro/branch true
```

### Per-project

[](#per-project)

```
composer require --dev folivoro/branch
```

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

[](#configuration)

The plugin reads `branch-local.json` from the project root as a flat key-value map:

```
{
    "vendor/package-name": "../path/to/package",
    "another/vendor": "/absolute/path/to/package"
}
```

### Global vs Per-project

[](#global-vs-per-project)

Modebranch-local.json locationUse case**Global**Project rootWorks across all projects**Per-project**Inside a projectProject-specific overridesRequirements
------------

[](#requirements)

- PHP 8.1+
- Composer 2.0+

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance84

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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 ~4 days

Total

2

Last Release

85d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b1ffd24dcf7f3f1cd5568a4b52fe0f6f3a8fc97f08e2b096a23606e4c79184d7?d=identicon)[sixmonkey](/maintainers/sixmonkey)

---

Top Contributors

[![sixmonkey](https://avatars.githubusercontent.com/u/15140258?v=4)](https://github.com/sixmonkey "sixmonkey (12 commits)")

---

Tags

plugincomposerdevelopmentlocalpath-repository

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/folivoro-branch/health.svg)

```
[![Health](https://phpackages.com/badges/folivoro-branch/health.svg)](https://phpackages.com/packages/folivoro-branch)
```

###  Alternatives

[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k41.8M3.0k](/packages/ergebnis-composer-normalize)[pyrech/composer-changelogs

Display changelogs after each composer update

5904.2M32](/packages/pyrech-composer-changelogs)[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

576.1M139](/packages/automattic-jetpack-autoloader)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5345.4M570](/packages/drupal-core-composer-scaffold)[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)[ffraenz/private-composer-installer

A composer install helper for private packages

2321.7M5](/packages/ffraenz-private-composer-installer)

PHPackages © 2026

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