PHPackages                             glook/isolated-composer - 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. glook/isolated-composer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

glook/isolated-composer
=======================

Tool for re-namespacing composer packages and source code to make it isolated

0.3.4(2mo ago)180↓50%MITPHP

Since Aug 25Pushed 2mo ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (9)Used By (0)

Isolated-composer
=================

[](#isolated-composer)

The library based on [Interfacelab/namespacer](https://github.com/Interfacelab/namespacer), which adds prefixes to the packages used by the composer, making them isolated.

Isolated-composer does the same, but modifies the application source code by adding the required namespaces. When using Isolated-composer, you will need to run `./Vendor/bin/isolated-composer` with arguments (see below), which will patch your source code and dependencies (for example, when using CI).

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

[](#installation)

You can install this globally, but I think you'd be better off using it as the basis of a project via composer.

```
composer require glook/isolated-composer
```

Usage
-----

[](#usage)

Once installed:

```
./vendor/bin/isolated-composer [options] [--composer COMPOSER] [--source SOURCE] [--package PACKAGE] [--namespace NAMESPACE] [--config CONFIG] [--vendor-dir vendor]
```

Usage with docker
=================

[](#usage-with-docker)

You use isolated-composer without installing it as composer dependency. Just use this image [glook/php-isolated-composer](https://hub.docker.com/r/glook/php-isolated-composer).

```
docker run --rm -it -v ${PWD}:/app \
    docker.io/glook/php-isolated-composer:latest --source /app \
    --package sample-prefix \
    --namespace SampleApp\\Vendor\\ \
    --no-dev \
    --vendor-dir vendor \
    /app/output
```

### Arguments

[](#arguments)

#### Tool options

[](#tool-options)

OptionDescription`--composer COMPOSER`Path to a composer.json to renamespace (mutually exclusive with `--source`).`--source SOURCE`Path to a directory with an existing vendor dir (mutually exclusive with `--composer`).`--package PACKAGE`Prefix to add to package names, e.g. `my-prefix`.`--namespace NAMESPACE`Prefix to add to PHP namespaces, e.g. `MyApp\\Vendor\\`.`--config CONFIG`Path to an optional PHP config file with filter hooks.`--vendor-dir NAME`Folder name for renamespaced packages (default: `vendor`).``Destination directory for the output.#### Output / interaction (Symfony Console built-ins, forwarded to `composer update`)

[](#output--interaction-symfony-console-built-ins-forwarded-to-composer-update)

OptionDescription`-q` / `--quiet`Do not output any message.`-v|-vv|-vvv` / `--verbose`Increase verbosity of messages (`-vvv` = debug).`-n` / `--no-interaction`Do not ask any interactive question.#### Composer passthrough — boolean flags

[](#composer-passthrough--boolean-flags)

OptionDescription`--dry-run`Outputs the operations but will not execute anything (implies `--verbose`).`--dev`Enables installation of require-dev packages.`--no-dev`Skip installing packages listed in require-dev.`--no-install`Skip the install step after updating the lock file.`--no-audit`Skip the audit step after updating the lock file.`--no-security-blocking`Audit prints warnings but does not block.`--lock`Only updates the lock file hash to suppress the out-of-date warning.`--no-autoloader`Skips autoloader generation.`--no-progress`Do not output download progress.`--no-plugins`Disables composer plugins.`--no-scripts`Skips execution of scripts defined in composer.json.`-w` / `--with-dependencies`Add dependencies of whitelisted packages to the whitelist.`-W` / `--with-all-dependencies`Add all dependencies of whitelisted packages to the whitelist.`-o` / `--optimize-autoloader`Optimize autoloader during autoloader dump.`-a` / `--classmap-authoritative`Autoload classes from the classmap only.`--apcu-autoloader`Use APCu to cache found/not-found classes.`--ignore-platform-reqs`Ignore all platform requirements (php &amp; ext- packages).`--prefer-stable`Prefer stable versions of dependencies.`--prefer-lowest`Prefer lowest versions of dependencies.`-m` / `--minimal-changes`During a partial update, only change versions in require/require-dev.`--patch-only`Only allow patch-level updates during a partial update.`--interactive`Interactive interface with autocompletion to select packages to update.`--root-reqs`Restricts the update to first-degree dependencies.#### Composer passthrough — value options

[](#composer-passthrough--value-options)

OptionDescription`--prefer-install=SOURCE`Force installation from `source`, `dist`, or `auto`.`--audit-format=FORMAT`Audit output format: `table`, `plain`, `json`, or `summary`.`--with=CONSTRAINT`Temporary version constraint, e.g. `foo/bar:1.0.0`.`--apcu-autoloader-prefix=PREFIX`Custom prefix for the APCu autoloader cache.`--bump-after-update=MODE`Run bump after update: `dev`, `no-dev`, or `true`.`--ignore-platform-req=PACKAGE`Ignore a specific platform requirement (repeatable).For example, you might run it:

```
./vendor/bin/namespacer --composer sample.composer.json --config sample.config.php --package mypackage --namespace MyNamespace\Vendor build/
```

In this example, we're pointing to a `composer.json` file containing the packages we want to re-namespace and to a config file that contains filters that will apply more manual patches during the re-namespace process. The output of the processing will be put into the `build/` folder.

### Filtering (Patching in PHP-Scoper parlance)

[](#filtering-patching-in-php-scoper-parlance)

You can see some example configurations in `vendor/glook/isolated-composer/sample.config.php` and `vendor/glook/isolated-composer/patches.config.php` that will demonstrate how to insert your own code into the namespacing process to catch special cases.

Reporting Bugs
--------------

[](#reporting-bugs)

If you run into issues, please open a ticket and attach the composer.json you were trying to process with a clear description of the problem.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance84

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.8% 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 ~287 days

Recently: every ~464 days

Total

8

Last Release

81d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f2a24f7c11b723d30417c0182a228d29d4b85bfb58eb2729235fa7093b84320?d=identicon)[glook](/maintainers/glook)

---

Top Contributors

[![jawngee](https://avatars.githubusercontent.com/u/44449?v=4)](https://github.com/jawngee "jawngee (7 commits)")[![glook](https://avatars.githubusercontent.com/u/545998?v=4)](https://github.com/glook "glook (6 commits)")

---

Tags

composerphpwordpresswpcomposerwordpressnamespace

### Embed Badge

![Health badge](/badges/glook-isolated-composer/health.svg)

```
[![Health](https://phpackages.com/badges/glook-isolated-composer/health.svg)](https://phpackages.com/packages/glook-isolated-composer)
```

###  Alternatives

[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)[typisttech/imposter

Wrapping all composer vendor packages inside your own namespace. Intended for WordPress plugins.

111286.6k1](/packages/typisttech-imposter)[justcoded/wordpress-theme-boilerplate

WordPress theme boilerplate with better code structure and OOP support.

563.9k1](/packages/justcoded-wordpress-theme-boilerplate)[ilab/namespacer

Tool for re-namespacing composer packages for use in WordPress plugins.

291.1k](/packages/ilab-namespacer)[wordpress/skeleton

Composer based WordPress project skeleton.

461.7k](/packages/wordpress-skeleton)

PHPackages © 2026

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