-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of dependencies without any licenses at all (#44)
We made an incorrect assumption that "none" would be substituted in by Composer (as the text output of `composer licenses` does) when this situation happens. Fixes 2 issues: - `composer licenses` returns an empty list of licenses when a dependency does not specify a license at all. Our parsing here would result in always accepting that dependency (as we were iterating the licenses, so had nothing to reject). - `installed.json` does not contain the `license` key when a dependency does not specify a license at all. Our parsing would error out entirely on missing key when this was encountered. This fixes both issues, rejecting any depedencies which do not specify a license, and are not explicitly allowed as a vendor or package in configuration. --------- Co-authored-by: Marcin Michalski <marcin+github@michalski.dev>
- Loading branch information
1 parent
6f8809b
commit 7268465
Showing
14 changed files
with
95 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "composer-license-checker/data", | ||
"type": "project", | ||
"license": "MIT", | ||
"require": { | ||
"lendable/unlicensed": "^1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"packages": [ | ||
{ | ||
"name": "lendable/unlicensed", | ||
"version": "1.2.3" | ||
} | ||
], | ||
"dev": true | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters