webimpress/composer-extra-dependency
Composer 安装命令:
composer require webimpress/composer-extra-dependency
包简介
Composer plugin to require extra dependencies
README 文档
README
This composer plugin allows you to require composer dependencies in version
specified by user during the installation. It modifies the composer.json file
and add required package in require section.
This can be useful when your library supports multiple version of some dependencies and you'd like to force user to use an explicit dependency instead of depending on implicit dependencies from your library.
Usage
Require the package in your library:
# composer require webimpress/composer-extra-dependency
Update your composer.json file: in section extra.dependency add package(s)
you'd like to install with your library:
{
"name": "my/package",
"description": "This is my package",
"extra": {
"dependency": [
"package/to-require",
...
]
},
"require": {
"php": "^5.6 || ^7.0",
"webimpress/composer-extra-dependency": "^0.1 || ^1.0",
...
}
...
}
Then, during installation of your library, user will be prompted:
# Enter the version of package/to-require to require (or leave blank to use the latest version):
After providing the version, composer.json of the user will be update
(package will be added in require section with version provided by user).
If user does not provide the version, plugin will try to find package in the
latest version matching platform requirements and other dependencies.
Here also composer.json will be updated and package will be installed.
Plugin runs always on post update/install package to check if there are some
dependencies to require explicitly in user composer.json file.
If dependency is already provided in user
composer.json(requireorrequire-devsection) the plugin is not going to do anything.
Please note plugin works only in development interactive mode. It means when
--no-devor--no-interactionflags are provided, plugin is not going to do anything.
webimpress/composer-extra-dependency 适用场景与选型建议
webimpress/composer-extra-dependency 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 706.03k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2017 年 10 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「dependency」 「composer」 「webimpress」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 webimpress/composer-extra-dependency 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 webimpress/composer-extra-dependency 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 webimpress/composer-extra-dependency 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Tool to write files safely, to avoid race conditions
Webimpress Coding Standard
Compatibility library for Draft PSR-15 HTTP Middleware
A fast and intuitive dependency injection container.
This composer plugin enables installation of GravityForms WordPress plugin and its addons.
统计信息
- 总下载量: 706.03k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 37
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-2-Clause
- 更新时间: 2017-10-11