Skip to content

Instantly share code, notes, and snippets.

@akoepcke
Created August 31, 2018 08:11
Show Gist options
  • Save akoepcke/ecb329f7cca0b72e5c49bf73aee50cee to your computer and use it in GitHub Desktop.
Save akoepcke/ecb329f7cca0b72e5c49bf73aee50cee to your computer and use it in GitHub Desktop.
composer-link()
// Require local folder as Composer dependency
// whereas _package_ is a unique package ID to keep composer from overwriting existing config
//
// from within the project folder, run the following:
// composer-link /path/to/package package
// Then run composer require as usual.
composer-link() {
composer config repositories."$2" '{"type": "path", "url": "'$1'"}' --file composer.json
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment