PHPackages                             vaimo/composer-repository-bundle - 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. vaimo/composer-repository-bundle

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

vaimo/composer-repository-bundle
================================

Allow packages to be installed from a repository or tarball bundle that have multiple packages in the sub-folders

1.7.2(4y ago)941.1k↓35.7%2MITPHPPHP &gt;=5.3.0

Since Jul 12Pushed 4y ago10 watchersCompare

[ Source](https://github.com/vaimo/composer-repository-bundle)[ Packagist](https://packagist.org/packages/vaimo/composer-repository-bundle)[ RSS](/packages/vaimo-composer-repository-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (18)Used By (0)

Vaimo Composer Repository Bundle
================================

[](#vaimo-composer-repository-bundle)

[![Latest Stable Version](https://camo.githubusercontent.com/70137d0398000560357a10335c2cd4e7d5f8a0993b3ae8bd80cbaff06a478b20/68747470733a2f2f706f7365722e707567782e6f72672f7661696d6f2f636f6d706f7365722d706174636865732f762f737461626c65)](https://packagist.org/packages/vaimo/composer-patches)[![Total Downloads](https://camo.githubusercontent.com/2c36e2e2d2c357ee88428613360dbfe87a63e32493860bbab4540d896fdad997/68747470733a2f2f706f7365722e707567782e6f72672f7661696d6f2f636f6d706f7365722d7265706f7369746f72792d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/vaimo/composer-repository-bundle)[![Daily Downloads](https://camo.githubusercontent.com/5cc0cbcc734d6eaa79ba6989033fe47e42a54c784c0d0d24c0c85daf1af0a0df/68747470733a2f2f706f7365722e707567782e6f72672f7661696d6f2f636f6d706f7365722d7265706f7369746f72792d62756e646c652f642f6461696c79)](https://packagist.org/packages/vaimo/composer-repository-bundle)[![Minimum PHP Version](https://camo.githubusercontent.com/9d5fb1751752677d3d5bc35c990806072ee2cf9015ebdea2c1764989bb712334/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7661696d6f2f636f6d706f7365722d7265706f7369746f72792d62756e646c652e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/b8aae951327527578bf18131a36546c80dcb1fdc085bc3f5a21b6f9d3a7e8402/68747470733a2f2f706f7365722e707567782e6f72672f7661696d6f2f636f6d706f7365722d7265706f7369746f72792d62756e646c652f6c6963656e7365)](https://packagist.org/packages/vaimo/composer-repository-bundle)

Allows composer package installation from repositories or zip files that have multiple packages inside of them or declare certain folder within the project as local repository.

In short: it removes the need to declare each local package as PATH repository and allows users to install things from remote .zip files (by downloading them and registering them - again - as PATH repositories).

More information on recent changes [HERE](./CHANGELOG.md).

Overview
--------

[](#overview)

Environment variables can be defined as key value pairs in the project's composer.json

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles": {},
        "bundles-package": {}
    }
}
```

These values will be declared for system-wide use. The main idea of the module is to provide a way to pre-configure any flags for any of the composer plugins in case the flag setting has not been properly exposed to the end-user.

Quick-start
-----------

[](#quick-start)

If you want to make local folder behave as if it's a package repository.

1. require this plugin `composer require vaimo/composer-repository-bundle`
2. configure it (see above)
3. add module under modules/mypackage with a composer.json (let's say that package name inside composer.json will be myvendor/module-mypackage).
4. install it with `composer require myvendor/module-mypackage:dev-my-bundle`

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles": {
            "my-bundle": "modules"
        }
    }
}
```

The installation will be done from packages that are declared as ...

```
modules/module1
modules/module2
...
```

If you want the files to be mirrored instead on sym-linked, which is the default behaviour, configure the [deploy mode](#configuration-deploy-mode) for your bundle.

If you have a plan to group your local packages different sub-folders, use [wildcards in path definition](#configuration-group-by-vendor).

Configuration: adding bundle definition
---------------------------------------

[](#configuration-adding-bundle-definition)

Can be done against zip file ...

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles": {
            "my-bundle": {
                "url": "https://github.com/magento-research/pwa-studio/archive/master.tar.gz"
            }
        }
    }
}
```

Same can be done against repository (in which case either branch name of change-set reference is required)

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles": {
            "my-bundle": {
                "url": "git@github.com:magento-research/pwa-studio.git",
                "reference": "9c6dfcc955df4b88218cd6c0eb6d0260df27117d"
            }
        }
    }
}
```

Configuration: local directory as repository
--------------------------------------------

[](#configuration-local-directory-as-repository)

The plugin can also be used to configure local project-embedded bundle folders from where modules will become installable.

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles": {
            "my-bundle": {
                "source": "modules"
            }
        }
    }
}
```

This allows any module to be installed from /modules. Note that the modules from a local bundle like this will sym-linked instead of being mirrored by default, but can be forced to be also mirrored by defining the installation mode. See the guide about [installation](#usage-installing-packages-from-bundle)for more details on how to install the package can be installed from the bundled repository.

The above (due to it's minimalistic setup) can also be configred as:

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles": {
            "my-bundle": "modules"
        }
    }
}
```

Configuration: deploy mode
--------------------------

[](#configuration-deploy-mode)

By default the module makes its own decision on how to deploy the package.

- **symlink** - done when bundle situated under the project root (bundle is part of the project).
- **mirror** - done when bundle situates in composer package cache (bundle is part of global composer).

Developer can override this by providing the mode in the bundle configuration.

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles": {
            "my-bundle": {
                "source": "modules",
                "mode": "mirror"
            }
        }
    }
}
```

Configuration: group by vendor
------------------------------

[](#configuration-group-by-vendor)

By default, all the packages will be included from the main level of the path that you pointed the bundle towards. This can be changed by using GLOB pattern in the path definition.

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles": {
            "my-bundle": {
                "source": "modules/*"
            }
        }
    }
}
```

This configuration will make it possible to define packages under several folders in format of ...

```
modules/myvendor/module1
modules/myvendor/module2
modules/othervendor/module2
...
```

Configuration: defining bundle sub-folders as repository root
-------------------------------------------------------------

[](#configuration-defining-bundle-sub-folders-as-repository-root)

By default, the bundle repository will consider every sub-folder on the main level of the bundle as potential installable package, in case the packages are available in some sub-folder(s), relative paths can be defined.

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles": {
            "my-bundle": {
                "url": "https://github.com/magento-research/pwa-studio/archive/master.tar.gz",
                "paths": ["packages"]
            }
        }
    }
}
```

Configuration: package template
-------------------------------

[](#configuration-package-template)

In case some of the installable sub-folders of the bundle are not directly installable (lack composer.json), the bundle plugin will create the missing package definitions. The only requirement is that the package.

If there are special parts of the composer.json that need to be defined, declare those under 'extra-package' as in same format as one would be declaring normal package configuration. The contents will be used as default values for generated package definitions:

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles-package": {
            "autoload": {
                "files": ["registration.php"]
            }
        }
    }
}
```

Configuration: custom target path for bundle download
-----------------------------------------------------

[](#configuration-custom-target-path-for-bundle-download)

In case you want bundle to be downloaded into the root of your directory, configure a target folder for it.

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles": {
            "my-bundle": {
                "url": "https://github.com/magento-research/pwa-studio/archive/master.tar.gz",
                "paths": ["packages"],
                "target": "pwa-studio"
            }
        }
    }
}
```

Note that the package installation in this case will result in packages being sym-linked instead of being mirrored.

Usage: installing packages from bundle
--------------------------------------

[](#usage-installing-packages-from-bundle)

Make sure that you have installed this plugin separately before you start installing packages from registered bundles.

After bundles have been registered in composer.json, user can just install them as any other composer package. Note that package versions are ignored, use dev-bundle instead.

```
composer require magento/theme-frontend-venia:'dev-my-bundle'

```

Note that 'composer require' is somewhat special as a command and does require a non-version string to be used when adding the module to the repository.

The constraint will be generated from bundle repository name, so in case you want to require the package as "dev-local", use the following:

```
{
    "_ignoreme": "this is the main level of composer.json",

    "extra": {
        "bundles": {
            "local": {
                "source": "modules"
            }
        }
    }
}
```

Note that this configuration will use the folder /modules as bundle repository and packages from there can be installed with

```
composer require vaimo/some-package:'dev-local'

```

Usage: updating the package
---------------------------

[](#usage-updating-the-package)

The Composer run will be provided with MD5 fingerprint of all the contents of every file in the pacakges, so updating a package (in case it was not symlinked to vendor). Can be done by just running normal composer update command.

```
composer update vaimo/some-package

```

Development: debugging
----------------------

[](#development-debugging)

In case the packages don't become installable, the developer is advised to run the require command with verbose mode.

```
composer require vaimo/some-package:'dev-local' -vvv

```

This should expose output similar to this one (if everything has been configured correctly):

```
Registering package endpoints
  - Including vaimo/some-package (e9db459e445a5fa10d4c6ff264332815)
    ~ Bundle: local
```

If something similar to this was not visible in the console output then the packages in the bundle folders are not visible for the Compsoer to install.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Recently: every ~294 days

Total

14

Last Release

1475d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/695d3feefa2118fb7005d5c6b3bbccb2e164ab48bb1a3eb64b3e7595298ce9e4?d=identicon)[vaimo](/maintainers/vaimo)

---

Top Contributors

[![urmo](https://avatars.githubusercontent.com/u/16291019?v=4)](https://github.com/urmo "urmo (6 commits)")

---

Tags

bundlescomposer-installercomposer-plugindownloaderproject repositorypackage bundlesub-folder packagescustom repositoryconsolidated local repositoryinstall from zipinstall from remote tarballinstall from github

### Embed Badge

![Health badge](/badges/vaimo-composer-repository-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/vaimo-composer-repository-bundle/health.svg)](https://phpackages.com/packages/vaimo-composer-repository-bundle)
```

###  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)
