承接 composer/spdx-licenses 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

composer/spdx-licenses

最新稳定版本:1.5.9

Composer 安装命令:

composer require composer/spdx-licenses

包简介

SPDX licenses list and validation library.

README 文档

README

SPDX (Software Package Data Exchange) licenses list and validation library.

Originally written as part of composer/composer, now extracted and made available as a stand-alone library.

Continuous Integration

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 a license identifier is deprecated
$licenses->isDeprecatedByIdentifier('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 is curated by SPDX. The data is pulled from the License List Data repository.

统计信息

  • 总下载量: 176.97M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1395
  • 点击次数: 1
  • 依赖项目数: 24
  • 推荐数: 2

GitHub 信息

  • Stars: 1393
  • Watchers: 7
  • Forks: 22
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04