1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 00:53:06 +00:00

remove spdx files, introduce external library

This commit is contained in:
Rob Bast 2015-07-16 11:42:12 +02:00
parent 92faf1c7a8
commit 5ae9e7fe22
10 changed files with 68 additions and 1813 deletions

View file

@ -28,7 +28,7 @@ use Composer\Repository\CompositeRepository;
use Composer\Repository\ComposerRepository;
use Composer\Repository\PlatformRepository;
use Composer\Repository\RepositoryInterface;
use Composer\Util\SpdxLicense;
use Composer\Spdx\SpdxLicenses;
/**
* @author Robert Schönthal <seroscho@googlemail.com>
@ -390,12 +390,12 @@ EOT
*/
protected function printLicenses(CompletePackageInterface $package)
{
$spdxLicense = new SpdxLicense;
$spdxLicenses = new SpdxLicenses();
$licenses = $package->getLicense();
foreach ($licenses as $licenseId) {
$license = $spdxLicense->getLicenseByIdentifier($licenseId); // keys: 0 fullname, 1 osi, 2 url
$license = $spdxLicenses->getLicenseByIdentifier($licenseId); // keys: 0 fullname, 1 osi, 2 url
if (!$license) {
$out = $licenseId;