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

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

convertiv/preserve-paths
========================

Composer plugin for preserving custom paths and supporting nested packages

0.2.0(5y ago)0325GPL-2.0+PHP

Since Dec 27Pushed 5y agoCompare

[ Source](https://github.com/Convertiv/preserve-paths)[ Packagist](https://packagist.org/packages/convertiv/preserve-paths)[ Docs](https://github.com/convertiv/preserve-paths)[ RSS](/packages/convertiv-preserve-paths/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (6)Versions (9)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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.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 ~304 days

Recently: every ~458 days

Total

8

Last Release

2019d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2050f94d457dad00182d22f02179dc0a47295cc7980974c8c4f026e7c3d20cac?d=identicon)[brad.mering](/maintainers/brad.mering)

---

Top Contributors

[![derhasi](https://avatars.githubusercontent.com/u/118502?v=4)](https://github.com/derhasi "derhasi (67 commits)")[![bradmering](https://avatars.githubusercontent.com/u/829674?v=4)](https://github.com/bradmering "bradmering (5 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)")[![arkener](https://avatars.githubusercontent.com/u/16407031?v=4)](https://github.com/arkener "arkener (1 commits)")[![webflo](https://avatars.githubusercontent.com/u/123946?v=4)](https://github.com/webflo "webflo (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)")[![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/convertiv-preserve-paths/health.svg)

```
[![Health](https://phpackages.com/badges/convertiv-preserve-paths/health.svg)](https://phpackages.com/packages/convertiv-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.3M14](/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)[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)[arokettu/composer-license-manager

License management plugin for Composer

61207.9k](/packages/arokettu-composer-license-manager)

PHPackages © 2026

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