phar-io/composer-distributor
Composer 安装命令:
composer require phar-io/composer-distributor
包简介
Base Code for a composer plugin that installs PHAR-files
README 文档
README
If you have a tool that behaves like a binary and want to distribute this tool as a PHAR file instead of the source-code but don't want to give up the convenience to install your tool via Composer you can use this library to create a Composer-Plugin that deals with this in no time.
Motivation
Tools like PHPUnit, PHPStan, Psalm and many others are best installed as PHAR to avoid
version conflicts between your dev tools and your own source code. But since so many developers
just want to use Composer to install all the tools this project was created to simplify the
deployment of PHAR files via Composer.
Create your own
To create a Composer-Plugin that installs your PHAR files follow these 3 steps.
Step 1 - Create your Composer-Plugin
The easiest way is to run the following command and follow the instructions.
composer create-project phar-io/mediator /path/to/your/directory/
This will create the plugin in the specified directory.
Make sure the information in your distibutor.xml configuration is correct.
<?xml version="1.0" encoding="UTF-8"?> <distributor xmlns="https://phar.io/composer-distributor" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://phar.io/xml/distributor/1.0/schema.xsd" packageName="yournamespace/pluginname" keyDirectory="keys"> <phar name="pharname" file="https://github.com/yournamespace/pluginname/releases/download/{{version}}/pharname.phar" signature="https://github.com/yournamespace/pluginname/releases/download/{{version}}/pharname.phar.asc"/> </distributor>
Step 2 - Create a Composer package for your plugin on packagist
Create a git repository for your plugin on the platform of your choosing. Then head over to packagist.org and set up a Composer package for your plugin.
⚠️ REMINDER ⚠️
Remember to tag your plugin repository as well whenever you release a new version.
Step 3 - Enjoy your PHAR deployment
Now everybody can install your PHAR by running the following command.
composer require --dev yournamespace/yourpluginname
phar-io/composer-distributor 适用场景与选型建议
phar-io/composer-distributor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 748.98k 次下载、GitHub Stars 达 13, 最近一次更新时间为 2020 年 11 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「composer」 「distribute」 「binary」 「phar」 「bin」 「phive」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 phar-io/composer-distributor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 phar-io/composer-distributor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 phar-io/composer-distributor 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This composer plugin enables installation of GravityForms WordPress plugin and its addons.
A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.
Simple ASCII output of array data
Bit I/O library
Generate a Composer repository from installed WordPress plugins and themes.
统计信息
- 总下载量: 748.98k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 24
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-10