no-response-mate / composer-integration-plugin
Quick switching between integrations' dependencies
Installs: 37 369
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:composer-plugin
Requires
- php: ^8.0
- composer-plugin-api: ^2.0
Requires (Dev)
- composer/composer: ^2.0
- phpstan/phpstan: ^1.5.4
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.19
This package is not auto-updated.
Last update: 2024-12-16 17:08:50 UTC
README
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.