PHPackages                             othercommerce/composer-plugin - 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. othercommerce/composer-plugin

ActiveComposer-plugin

othercommerce/composer-plugin
=============================

1.1.0(1y ago)044MITPHPPHP ^8.2

Since Mar 15Pushed 1y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

OtherCommerce Composer Plugin
=============================

[](#othercommerce-composer-plugin)

This plugin provides an easy way to configure OtherCommerce dependency using composer in the projects. It solves an issue of using a local repository as a dependency when working on the OtherCommerce core features, and using a proper remote repository in production without having to manually changing your `composer.json` file every time.

- [OtherCommerce Composer Plugin](#othercommerce-composer-plugin)
    - [How does it work](#how-does-it-work)
    - [Installation](#installation)
    - [Configuration](#configuration)
        - [Keeping configuration file in repository](#keeping-configuration-file-in-repository)
        - [Available options](#available-options)
            - [`remote.url`](#remoteurl)
            - [`remote.force`](#remoteforce)
            - [`local.path`](#localpath)
        - [Using environment variable](#using-environment-variable)
            - [Setting in Unix](#setting-in-unix)
            - [Setting in Windows](#setting-in-windows)
        - [Note on the paths](#note-on-the-paths)

How does it work
----------------

[](#how-does-it-work)

This plugin simply manages composer.json repositories to provide a proper version of OtherCommerce core package into your project. You can configure path where your local repo is to load a local dependency, or let the plugin use a standard remote repository.

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

[](#installation)

This plugin has to be installed globally, as it needs to be available before composer tries to fetch dependencies resolved by the plugin. This is kind of chicken-egg-dilemma situation.

Simply install this plugin globally using composer:

```
composer global require othercommerce/composer-plugin
```

When asked to trust plugin type `y` in your terminal, this will allow plugin to be executed by composer, when installing dependencies in your projects.

If you didn't allow the plugin at first install, you can configure this later in your global `composer.json` file to enable it:

```
{
    "config": {
        "allow-plugins": {
            "othercommerce/composer-plugin": true
        }
    }
}
```

Usually, you can find your global `composer.json` in your user home directory inside `.composer` hidden directory.

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

[](#configuration)

This plugin accepts some option to manage how, and where it gets things from. You can provide configuration as a JSON file within your project. The plugin looks for file with names:

- `oc.json`
- `othercommerce.json`
- `other_commerce.json`

The full JSON configuration example:

```
{
    "remote": {
        "url": "git@github.com:othercommerce/framework.git",
        "force": false
    },
    "local": {
        "path": "/home/acme/othercommerce/framework"
    }
}
```

### Keeping configuration file in repository

[](#keeping-configuration-file-in-repository)

Basically you should not commit your config file into the repository and keep it in your `.gitignore` file. This file is meant to configure the plugin on your local machine only, and anyone else would have a different options here.

However, since this plugin is also used in production, you can use this file to replace the core package repository by example. This should never happen actually, but there is such option possible.

### Available options

[](#available-options)

#### `remote.url`

[](#remoteurl)

This option provides a URL to a Git repository with OtherCommerce core package. Usually you won't need to change that setting, unless some experiments, or going into a full overwrite mode of the core within your project.

#### `remote.force`

[](#remoteforce)

When this option is set to `true` the plugin will always resolve dependency from the remote repository, even if you had configured a local path. This can be helpful in the future, when you would be working on multiple major versions of the core within your projects.

#### `local.path`

[](#localpath)

This option is to provide a per-project path to your local repository with the core package. You might have multiple copies of core repository on your computer, for example, separate copies for v1, v2, etc. Then in your project you can set a proper path for the version a project uses, for example v1, while keeping a v2 in your other project.

### Using environment variable

[](#using-environment-variable)

The plugin by default automatically looks for `OTHER_COMMERCE_PATH` environment variable, to resolve your local copy of core repository to use. It is the default behaviour and can be overwritten by `local.path` option per-project.

This is recommended approach when working with mostly the same major version of the core, as you won't even need to provide a config file for the plugin.

#### Setting in Unix

[](#setting-in-unix)

Find your bash profile file. Usually it might be `~/.bash_profile` or `~/.zshrc`depending on what you use for your terminal, and define an environment variable there like so, replacing the path with your location:

```
export OTHER_COMMERCE_PATH = "/home/acme/othercommerce/framework"
```

#### Setting in Windows

[](#setting-in-windows)

1. Right-click on **Computer** icon and choose **Properties**, or in Windows Control Panel, choose **System**.
2. Choose **Advanced system settings**.
3. On the Advanced tab, click **Environment Variables**
4. Click **New** to set up a new variable with name `OTHER_COMMERCE_PATH` and your core package path as value.

### Note on the paths

[](#note-on-the-paths)

Either setting your path in configuration file, or in environment variable, always put an absolute path to your core package local copy. Thanks to that you'll avoid any issues with paths resolution.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

Total

2

Last Release

654d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6891c4b4c60e40edb5bce9bdc00da0d47b5f64488675c7ffaa74154001acc6c?d=identicon)[othercommerce](/maintainers/othercommerce)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/othercommerce-composer-plugin/health.svg)

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

###  Alternatives

[humbug/box

Fast, zero config application bundler with PHARs.

1.3k801.5k69](/packages/humbug-box)[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)[roots/wordpress-core-installer

A Composer custom installer to handle installing WordPress as a dependency

4115.6M19](/packages/roots-wordpress-core-installer)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)

PHPackages © 2026

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