package-url/packageurl-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

package-url/packageurl-php

Composer 安装命令:

composer require package-url/packageurl-php

包简介

Builder and parser based on the package URL (purl) specification.

README 文档

README

shield_gh-workflow-test shield_packagist-version shield_license

A parser and builder based on package url spec, implemented in PHP.

License: MIT

Note

PackageURL (PURL) is currently undergoing a process of review and standardization, leading to updates in the specification.
As a result, this library may no longer comply with the latest PURL standards. It will not receive further updates until the standardization process is complete and a stable version of the specification is released. See #243

Install

composer require package-url/packageurl-php

Usage

see also the examples.

<?php

use PackageUrl\PackageUrl;

$purl = (new PackageUrl('composer', 'console'))
    ->setNamespace('symfony')
    ->setVersion('6.3.8')
    ->setQualifiers([
        PackageUrl::QUALIFIER_VCS_URL => 'git+https://github.com/symfony/console.git@v6.3.8',
    ]);

$purlString = $purl->toString();

var_dump($purlString);
// string(96) "pkg:composer/symfony/console@6.3.8?vcs_url=git%2Bhttps://github.com/symfony/console.git%40v6.3.8"

var_dump((string) $purl);
// string(96) "pkg:composer/symfony/console@6.3.8?vcs_url=git%2Bhttps://github.com/symfony/console.git%40v6.3.8"

$purl2 = PackageUrl::fromString($purlString);
var_dump($purl == $purl2);
// bool(true)

Contributing

Feel free to open pull requests.
See the contribution docs for details.

统计信息

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

GitHub 信息

  • Stars: 13
  • Watchers: 2
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固