PHPackages                             sandykadam/preserve-paths - 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. sandykadam/preserve-paths

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

sandykadam/preserve-paths
=========================

Composer plugin for preserving custom paths and supporting nested packages

0.4(2y ago)07.9k↓24.2%GPL-2.0-or-laterPHP

Since Apr 6Pushed 2y agoCompare

[ Source](https://github.com/sandykadam/preserve-paths)[ Packagist](https://packagist.org/packages/sandykadam/preserve-paths)[ Docs](https://github.com/sandykadam/preserve-paths)[ RSS](/packages/sandykadam-preserve-paths/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

Composer preserve paths
=======================

[](#composer-preserve-paths)

Composer plugin for preserving paths while installing, updating or uninstalling packages.

This way you can:

- provide custom files or directories that will not be overwritten on `composer install` or `composer update`
- place packages within the directory of another package (using a composer installer like [composer/installers](https://packagist.org/packages/composer/installers) or [davidbarratt/custom-installer](https://packagist.org/packages/davidbarratt/custom-installer))

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

[](#installation)

Simply install the plugin with composer: `composer require drupal-composer/preserve-paths`

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

[](#configuration)

For configuring the paths you need to set `preserve-paths` within the `extra` of your root `composer.json`.

```
{
    "extra": {
        "preserve-paths": [
          "web/sites/all/modules/contrib",
          "web/sites/all/themes/contrib",
          "web/sites/all/libraries",
          "web/sites/all/drush"
        ]
      }
}
```

Example
-------

[](#example)

An example composer.json using [composer/installers](https://packagist.org/packages/composer/installers):

```
{
  "repositories": [
    {
      "type": "composer",
      "url": "https://packages.drupal.org/7"
    }
  ],
  "require": {
    "composer/installers": "^1.2",
    "drupal-composer/preserve-paths": "0.1.*",
    "drupal/views": "3.*",
    "drupal/drupal": "7.*"
  },
  "config": {
    "vendor-dir": "vendor"
  },
  "extra": {
    "installer-paths": {
      "web/": ["type:drupal-core"],
      "web/sites/all/modules/contrib/{$name}/": ["type:drupal-module"],
      "web/sites/all/themes/contrib/{$name}/": ["type:drupal-theme"],
      "web/sites/all/libraries/{$name}/": ["type:drupal-library"],
      "web/sites/all/drush/{$name}/": ["type:drupal-drush"],
      "web/profiles/{$name}/": ["type:drupal-profile"]
    },
    "preserve-paths": [
      "web/sites/all/modules/contrib",
      "web/sites/all/themes/contrib",
      "web/sites/all/libraries",
      "web/sites/all/drush",
      "web/sites/default/settings.php",
      "web/sites/default/files"
    ]
  }
}
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 77% 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

4

Last Release

772d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1227241?v=4)[Sandeep Kadam](/maintainers/sandykadam)[@sandykadam](https://github.com/sandykadam)

---

Top Contributors

[![derhasi](https://avatars.githubusercontent.com/u/118502?v=4)](https://github.com/derhasi "derhasi (67 commits)")[![sandykadam](https://avatars.githubusercontent.com/u/1227241?v=4)](https://github.com/sandykadam "sandykadam (7 commits)")[![webflo](https://avatars.githubusercontent.com/u/123946?v=4)](https://github.com/webflo "webflo (3 commits)")[![markpavlitski](https://avatars.githubusercontent.com/u/3777070?v=4)](https://github.com/markpavlitski "markpavlitski (2 commits)")[![bnchdrff](https://avatars.githubusercontent.com/u/99194?v=4)](https://github.com/bnchdrff "bnchdrff (2 commits)")[![tobbexiv](https://avatars.githubusercontent.com/u/5681598?v=4)](https://github.com/tobbexiv "tobbexiv (1 commits)")[![greg-1-anderson](https://avatars.githubusercontent.com/u/612191?v=4)](https://github.com/greg-1-anderson "greg-1-anderson (1 commits)")[![colinodell](https://avatars.githubusercontent.com/u/202034?v=4)](https://github.com/colinodell "colinodell (1 commits)")[![deminy](https://avatars.githubusercontent.com/u/865547?v=4)](https://github.com/deminy "deminy (1 commits)")[![arkener](https://avatars.githubusercontent.com/u/16407031?v=4)](https://github.com/arkener "arkener (1 commits)")[![NickDickinsonWilde](https://avatars.githubusercontent.com/u/92694?v=4)](https://github.com/NickDickinsonWilde "NickDickinsonWilde (1 commits)")

---

Tags

installercomposer-plugincustom pathnested package

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sandykadam-preserve-paths/health.svg)

```
[![Health](https://phpackages.com/badges/sandykadam-preserve-paths/health.svg)](https://phpackages.com/packages/sandykadam-preserve-paths)
```

###  Alternatives

[drupal-composer/preserve-paths

Composer plugin for preserving custom paths and supporting nested packages

271.1M5](/packages/drupal-composer-preserve-paths)[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)[mnsami/composer-custom-directory-installer

A composer plugin, to help install packages of different types in custom paths.

1395.0M52](/packages/mnsami-composer-custom-directory-installer)[typo3/cms-composer-installers

TYPO3 CMS Installers

6113.7M52](/packages/typo3-cms-composer-installers)[typisttech/imposter-plugin

Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

158251.0k2](/packages/typisttech-imposter-plugin)[craftcms/plugin-installer

Craft CMS Plugin Installer

283.3M4](/packages/craftcms-plugin-installer)

PHPackages © 2026

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