How To Load Composer Packages from a VCS Repo

Another TIL short tip, this time on composer syntax for loading a custom package (or a non-registered package, or whatever the case may be) from version control.

So, I'm building a Formstack API extension for the marvelous Bolt CMS, and I decided to use Josh Gulledge's FormStackAPI PHP integration.

The thing with Bolt CMS is that it uses its own (Satis) package repository for Composer, and it disables the use of the standard packagist.org repos. This means packages must be loaded from the Bolt marketplace, or else manually via a repositories entry.

So I have the choice to either include the package source in my repo, or link to it via a special vcs repository setting in composer.json. I chose the latter.

"repositories": {
  "fstackapi_php-git-repo": {
    "type":"vcs",
    "url":"https://github.com/jgulledge19/FormStackAPI"
  }
}

Original tip posted at https://github.com/mborn319/today-i-learned/blob/master/php/load-composer-packages-from-vcs-repo.md

August 26, 2018

« Today I Learned: How to Convert a PPK Key File to OpenSSH Format - TIL: SSH Key Permissions Must Be Exact! »