You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
9 years ago | |
|---|---|---|
| .. | ||
| res | 9 years ago | |
| src | 9 years ago | |
| .php_cs.dist | 9 years ago | |
| CHANGELOG.md | 9 years ago | |
| LICENSE | 9 years ago | |
| README.md | 9 years ago | |
| composer.json | 9 years ago | |
README.md
composer/spdx-licenses
SPDX licenses list and validation library.
Originally written as part of composer/composer, now extracted and made available as a stand-alone library.
Installation
Install the latest version with:
$ composer require composer/spdx-licenses
Basic Usage
<?php
use Composer\Spdx\SpdxLicenses;
$licenses = new SpdxLicenses();
// get a license by identifier
$licenses->getLicenseByIdentifier('MIT');
// get a license exception by identifier
$licenses->getExceptionByIdentifier('Autoconf-exception-3.0');
// get a license identifier by name
$licenses->getIdentifierByName('MIT License');
// check if a license is OSI approved by identifier
$licenses->isOsiApprovedByIdentifier('MIT');
// check if input is a valid SPDX license expression
$licenses->validate($input);
Read the specifications to find out more about valid license expressions.
Requirements
- PHP 5.3.2 is required but using the latest version of PHP is highly recommended.
License
composer/spdx-licenses is licensed under the MIT License, see the LICENSE file for details.
Source
License information taken from spdx.org.