Skip to content

NoResponseMate/ComposerIntegrationPlugin

Repository files navigation

Composer Integration Plugin

Quick switching between integration dependencies

Installation

composer require --dev sylius-labs/composer-integration-plugin

Add this plugin to allowed plugins:

"config": {
    "allow-plugins": {
        "sylius-labs/composer-integration-plugin": true
    }
},

Configuration

Basic integration configuration:

"extra": {
    "integration": {
        "my-integration": {
            "require": {
                "league/uri": "^6",
                "psr/http-factory": "^1"
            }
        }
    }
}

With a custom APP_ENV variable if you're using .env files:

"extra": {
    "integration": {
        "my-integration": {
            ...
            "env": "my-integration-special-environment"
        }
    }
}

If your .env files are located somewhere else than project root, you can point to their location using the integration-options.env-path node:

"extra": {
    "integration-options": {
        "env-path": "public/app/env/"
    },
    "integration": {
        "my-integration": {
            ...
            "env": "my-integration-special-environment"
        }
    }
}

The env-directory node takes in a path relative to your current working directory (usually project root).

Usage

Once you have your integrations configured you can switch between them by running:

composer integration my-integration

To return to your base composer dependencies simply run:

composer install

By default, no scripts are run when installing an integration, if you would like to enable them use the with-scripts option:

composer integration my-integration --with-scripts

The plugin uses the install command internally and as such, only install related scripts would be run.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages