Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #152
Adds a new dependency source enumerator for composer to enumerate php package dependencies.
The primary source of information is the
composer.lock
file. Sincelicensed
requires dependencies to be installed locally before it can be run andphp composer.phar install
will autocreate a lockfile, it should be rare to have dependencies installed without a lockfile being present.In order for dependencies to be enumerated
composer.lock
file must be available at the licensed app source pathThe composer application path defaults to
composer.phar
, which is appended to the licensed app source path for a final result of<repository root>/composer.phar
. The composer application path can be overridden by adding acomposer.application_path
configuration value to.licensed.yml
. The configuration value can be relative to the licensed app source path or an absolute path, and it can contain path directives like~
or..
.BE WARNED
I haven't used PHP in about 15 years, and I haven't ever used composer before this. The implementation seemed relatively straightforward but if there are edge cases that aren't handled I will be asking those that submit issues for help 😆