PHPackages                             idct/composer-custom-directory - 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. idct/composer-custom-directory

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

idct/composer-custom-directory
==============================

A composer plugin, to install differenty types of composer packages in custom directories outside the default composer default installation path which is in the `vendor` folder.

69.6k1[3 issues](https://github.com/bpacholek/composer-custom-directory/issues)PHP

Since Feb 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bpacholek/composer-custom-directory)[ Packagist](https://packagist.org/packages/idct/composer-custom-directory)[ RSS](/packages/idct-composer-custom-directory/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

composer-custom-directory-installer
===================================

[](#composer-custom-directory-installer)

A composer plugin, to install differenty types of composer packages in custom directories outside the default composer default installation path which is in the `vendor` folder.

Based &amp; heavily influenced by repository by `mnsami`: (Moved outside of a fork due to slow or no maintenance by the original author.)

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

[](#installation)

- Include the composer plugin into your `composer.json` `require` section - for example:

```
  "require":{
    "php": ">=5.4",
    "idct/composer-directory-installer": "1.0.*",
    "monolog/monolog": "*"
  }

```

- In the `extra` section define the custom directory you want to the package to be installed in::

```
  "extra":{
    "installer-paths":{
      "./monolog/": ["monolog/monolog"]
    }

```

by adding the `installer-paths` part, you are telling composer to install the `monolog` package inside the `monolog` folder in your root directory.

Dynamic paths
=============

[](#dynamic-paths)

Feature which allows you to install packages in different directories depending on a set of predefined tokens.

- For example, a setting:

```
    "extra": {
        "installer-paths": {
            "./packages/{$name}": ["sourcepackage/package_A","sourcepackage/package_B","sourcepackage/package_B"]
        }
    },

```

will install packages provided in the list (`sourcepackage/package_A`, `sourcepackage/package_B`, `sourcepackage/package_C`) in folders:

- `./packages/package_A`
- `./packages/package_B`
- `./packages/package_C`

defined tokens are:

- `$name` which will return the second part of the package name, after `/`. For example for `sourcepackage/package_A` it will be `package_A`. In case of missing parts will return `undefined`.
- `$package` - returns full package name.
- `$vendor` - same as `$name` but works with the first part of the package name.

Flags
=====

[](#flags)

Dynamic path definitions support flags for manipulation of the target name. Flags are parsed in a chain from the left to the right therefore the order of them is important

Currently supprted flags are:

- `F` - capitalizes first letter.
- `P` - changes all entries of a `_` or `-` followed by a character to only that character, capitalized.

Usage:

Flags should be entered after the flag variable followed by a pipe `|`.

For example:

```
    "extra": {
        "installer-paths": {
            "./packages/{$name|FP}": ["sourcepackage/my_package1","sourcepackage/my_package2","sourcepackage/my_package3"]
        }
    },

```

will install the packages into folders:

- `./packages/MyPackage1`
- `./packages/MyPackage2`
- `./packages/MyPackage3`

As the flag `F` will make the first letter a capital letter and the flag `P` will remove all `_` (or `-`) and capitalize the following letter.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/168780730?v=4)[IDCT Bartosz Pachołek](/maintainers/ideaconnect)[@ideaconnect](https://github.com/ideaconnect)

### Embed Badge

![Health badge](/badges/idct-composer-custom-directory/health.svg)

```
[![Health](https://phpackages.com/badges/idct-composer-custom-directory/health.svg)](https://phpackages.com/packages/idct-composer-custom-directory)
```

###  Alternatives

[glhd/special

2032.3k](/packages/glhd-special)[mwsimple/scdatetimepicker-bundle

Symfony bundle for Bootstrap DateTime picker - Twigv3

1164.8k1](/packages/mwsimple-scdatetimepicker-bundle)

PHPackages © 2026

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