aedart/license-file-manager
最新稳定版本:2.0.0
Composer 安装命令:
composer require aedart/license-file-manager
包简介
A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy funct
README 文档
README
Abandoned - License File Manager
A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a "glorified" wrapper for PHP's copy function, but it makes managing license files a bit easier, when you are developing multiple packages.
Contents
When to use this
How many composer-based packages are you working on? Do any of them contain a small file, named LICENSE? How do you manage that file, across all of your packages?
If you wish to maintain your license files from a single repository (or package) and just fetch the latest released version-file, then perhaps this small package might be able to help you.
How to install
composer require aedart/license-file-manager 1.*
This package uses composer. If you do not know what that is or how it works, I recommend that you read a little about, before attempting to use this package.
Quick start
Prerequisite
You should know how to work with git-scm
You should have some knowledge of how to create, publish and work with composer based projects
Step 1: Create a repository (with a composer file)
Create a new repository that must contain your various license files.
Remember to also create a composer file for that package, with a custom name, e.g. Acme/License
If you need inspiration for how you could organise your files, please review the folder structure of Aedart/License
Step 2: Create your license file
In your new repository, create a license file.
Tip: If you know that you are going to work with multiple types of licenses, then perhaps you should name each of your license-files according to their type, e.g. Apache-2-license
Step 3: Publish your license repository / package
You can publish repository, once your license-file(s) are ready to be used in one of your projects.
However, please note that composer does also allow loading directly from repositories, if you do not wish to publish it on Packagist. For additional information, review the Repositories section on composer’s documentation.
Step 4: Require your license package and License Manager dependencies
In you require or require-dev, state your license package dependency, as well as this manager’s dependency;
{
"require-dev": {
"acme/license": "1.*",
"aedart/license-file-manager": "1.*"
}
}
Run composer update…
Tip: Unless there is a good reason why your entire license package should end up in the vendor folder, for those that are using it, then you should just require it for development – specify your dependency in the ‘require-dev’ section of your composer file.
Step 5: Copy the desired license file
Invoke the following command, and your license file will be copied from your package into the root of your current project;
php vendor/bin/license-manager license:copy vendor/acme/license/Apache-2-license
A LICENSE file should be added into the root of your project.
NOTE: If there already exists a file named LICENSE in your project root, it will only be overwritten if its SHA1 checksum is not the same as the license file from the vendor folder.
Alternative: composer post-update-cmd script
If you wish to let composer do the work for you, each time that you work on your project, then you can specify a post update script, in your composer file;
{
"scripts": {
"post-update-cmd": "vendor/bin/license-manager license:copy vendor/acme/license/Apache-2-license"
}
}
Please note, this script will only be triggered when you are working on your package; thus, when it is being declared inside your root level composer file. Read more about composer’s scripts, in order to get a better understanding of how this works.
Onward
This package offers you a way to organise your various license files into a single repository and fetch the one that you need. However, on the down side, your license file is only updated when you are working with your package. Nevertheless, it might still be a better way of managing license files, rather than manually having to copy, paste and maintain them across multiple packages.
License
BSD-3-Clause, Read the LICENSE file included in this package
aedart/license-file-manager 适用场景与选型建议
aedart/license-file-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 635 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 04 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「manager」 「license」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 aedart/license-file-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 aedart/license-file-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 aedart/license-file-manager 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
HiDev plugin for license generation
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
Cpanel Licensing Class
Fantastico Licensing Class
Cloudlinux Licensing Class
LiteSpeed Licensing Class
统计信息
- 总下载量: 635
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 23
- 依赖项目数: 35
- 推荐数: 2
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-04-03