PHPackages                             sweetchuck/composer-repo-path - 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. sweetchuck/composer-repo-path

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

sweetchuck/composer-repo-path
=============================

@todo project description

2.x-dev(3mo ago)0959GPL-3.0-or-laterPHPPHP &gt;=8.4

Since Jan 31Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Sweetchuck/composer-repo-path)[ Packagist](https://packagist.org/packages/sweetchuck/composer-repo-path)[ Docs](https://github.com/Sweetchuck/composer-repo-path)[ RSS](/packages/sweetchuck-composer-repo-path/feed)WikiDiscussions 2.x Synced yesterday

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

Sweetchuck/composer-repo-path
=============================

[](#sweetchuckcomposer-repo-path)

[![CircleCI](https://camo.githubusercontent.com/547c9c727f4a8961c5f15ae52ee9fa5e9ffb470348c15036238888fdbf0ec57b/68747470733a2f2f636972636c6563692e636f6d2f67682f5377656574636875636b2f636f6d706f7365722d7265706f2d706174682f747265652f322e782e7376673f7374796c653d737667)](https://circleci.com/gh/Sweetchuck/composer-repo-path/?branch=2.x)[![codecov](https://camo.githubusercontent.com/a8b511060e1b09de859363dd543225d83da03d351d6b9536720e6da2800b3e4a/68747470733a2f2f636f6465636f762e696f2f67682f5377656574636875636b2f636f6d706f7365722d7265706f2d706174682f6272616e63682f322e782f67726170682f62616467652e7376673f746f6b656e3d4a344c3136345953474f)](https://app.codecov.io/gh/Sweetchuck/composer-repo-path/branch/2.x)

Composer plugin to download packages which are referenced in `composer.json#/repositories` with type "path".

Problem is that when there is a composer.json like the one below, then the `../../foo/bar` directory has to be exists *before* the `composer update` or `composer install` commands are invoked. This plugin tries to download them in an early phase by subscribing to the "pre command" events.

```
{
    "repositories": {
        "foo/bar": {
            "type": "path",
            "url": "../../foo/bar-1.x"
        }
    },
    "require": {
        "foo/bar": "*"
    }
}
```

Usage - global (recommended)
----------------------------

[](#usage---global-recommended)

1. `composer global require sweetchuck/composer-repo-path`
2. `cd somewhere/my/project-01`
    Edit your `composer.json` according to the following example: ```
    {
       "name": "my/project-01",
       "minimum-stability": "dev",
       "prefer-stable": true,
       "config": {
           "preferred-install": "dist"
       },
       "repositories": {
           "foo/bar": {
                "type": "path",
                "url": "../../foo/bar-1.x",
                "options": {
                     "repo-path": {
                         "url": "http://example.com/foo/bar.git",
                         "branch": "1.x"
                     }
                }
           }
       },
       "require": {
           "foo/bar": "*"
       }
    }
    ```
3. `composer update`
4. `ls -la '../../foo/bar-1.x'`> Should be a regular directory.
5. `ls -la 'vendor/foo'`> "bar" should be a symlink.

Usage - project
---------------

[](#usage---project)

Without a globally pre-installed `sweetchuck/composer-repo-path` plugin things are a little more complicated.
When `composer update` command runs first time in a clean project, then the `sweetchuck/composer-repo-path` plugin is not available, and if the `../../foo/bar-1.x` directory is not exists, then the Composer will throw an error.

The [composer-suite](https://github.com/Sweetchuck/composer-suite) plugin helps to solve this problem.

1. `cd somewhere/my/project-01`
2. composer.json ```
    {
        "name": "my/project-01",
        "minimum-stability": "dev",
        "prefer-stable": true,
        "config": {
            "preferred-install": "dist"
        },
        "repositories": {},
        "require": {
            "foo/bar": "^1.0"
        },
        "require-dev": {
            "sweetchuck/composer-repo-path": "1.x-dev",
            "sweetchuck/composer-suite": "1.x-dev"
        },
        "extra": {
           "composer-suite": {
               "local": {
                   "description": "Modifications for local development",
                   "actions": [
                       {
                           "type": "prepend",
                           "config": {
                               "parents": ["repositories"],
                               "items": {
                                   "foo/bar": {
                                       "type": "path",
                                       "url": "",
                                       "options": {
                                           "repo-path": {
                                               "url": "https://example.com/foo/bar.git",
                                               "remote": "upstream",
                                               "branch": "1.x"
                                           }
                                       }
                                   }
                               }
                           }
                       },
                       {
                           "type": "replaceRecursive",
                           "config": {
                               "parents": ["require"],
                               "items": {
                                   "foo/bar": "*"
                               }
                           }
                       }
                   ]
               }
           }
        }
    }
    ```
3. `composer update`
4. `composer suite:generate`
5. optional: `COMPOSER='composer.local.json' composer repo-path:download`
6. `COMPOSER='composer.local.json' composer update`

@TODO
-----

[](#todo)

### Command - composer repo-path:list

[](#command---composer-repo-pathlist)

List all the packages that are installed by symlinks.

Example: `composer repo-path:list

Example output: space separated package names.

> foo/bar baz/doo tab/fal

\--format='json|yaml|csv' option would be handy.

Together with [Sweetchuck/composer-suite](https://github.com/Sweetchuck/composer-suite)

```
{
  "scripts": {
    "suite:install:local": [
      "rm composer.local.json composer.local.lock",
      "composer suite:generate",
      "cp composer.lock composer.local.lock",
      "COMPOSER='composer.local.lock' composer update $(composer repo-path:list)"
    ],
    "suite:reset": [
      "rm $(COMPOSER='composer.local.lock' composer repo-path:list --format=json | jq 'find install dirs of the symlinked packages')",
      "composer install"
    ]
  }
}
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance81

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

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

Total

2

Last Release

100d ago

PHP version history (2 changes)2.x-devPHP &gt;=8.4

1.x-devPHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/591103?v=4)[Andor](/maintainers/Sweetchuck)[@Sweetchuck](https://github.com/Sweetchuck)

---

Top Contributors

[![Sweetchuck](https://avatars.githubusercontent.com/u/591103?v=4)](https://github.com/Sweetchuck "Sweetchuck (16 commits)")

###  Code Quality

TestsCodeception

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sweetchuck-composer-repo-path/health.svg)

```
[![Health](https://phpackages.com/badges/sweetchuck-composer-repo-path/health.svg)](https://phpackages.com/packages/sweetchuck-composer-repo-path)
```

###  Alternatives

[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)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[olvlvl/composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes

184108.8k8](/packages/olvlvl-composer-attribute-collector)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)

PHPackages © 2026

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