nfreear/composer-suggest
Composer 安装命令:
composer require nfreear/composer-suggest
包简介
Composer plugin to install a custom group of suggested packages, based on keyword patterns. ' vi .env && composer install '
README 文档
README
composer-suggest
A Composer plugin to install a custom group of suggested packages, based on keyword patterns. (Caution)
Example composer.json:
{
"suggest": {
"a/b": "1.0; This package is for [LACE] only",
"c/d": "2.1, This package is for JuxtaLearn and LACE.",
"e/f": "3.2, This is just for [JXL].",
"g/h": "1.0-beta; Experiment-A"
}
}
Usage
-
Set an environment variable containing a pattern/keywords in a
.envfile,echo 'NF_COMPOSER_SUGGEST="(EXP|LACE)"' > .env
-
Require the plugin,
composer require nfreear/composer-suggest -
Install as you would normally (verbose),
composer -vvv install
Legacy
In Composer script mode, an example composer.json might contain:
{
"suggest": {
"a/b": "1.0; This package is for [LACE] only",
"c/d": "2.1, This package is for JuxtaLearn and LACE.",
"e/f": "3.2, This is just for [JXL].",
"g/h": "1.0-beta; Experiment-A"
},
"scripts": {
"dry-run-suggest": "\\Nfreear\\Composer\\Suggest::dryRun",
"install-suggest": "\\Nfreear\\Composer\\Suggest::install",
"install-lace": "./vendor/bin/suggest --dry LACE"
}
}
Legacy usage:
> composer -v install-lace
Legacy advanced usage:
> composer -v dry-run-suggest "Ju?X(ta)?L" # Packages suggested for 'Juxtalearn' & 'JXL'. > composer -v dry-run-suggest "Experiment-A"
Test
composer test
Caution
Use of the composer-suggest plugin implies that you probably won't commit composer.lock to version control. Various people say this is bad, and as a general rule they are probably correct.
Composer-suggest works well when all/most of the dependencies in require and suggest
have precise version constraints (1.2.3) as opposed to loose ones (1.*, >= 1.5..).
It is also useful during rapid development phases of a project. See it in use in the LACE/ OER Research Hub code, and Open Media Player code-base.
Developed for the LACE Evidence Hub, part of the Learning Analytics Community Exchange project.
Inspired by and based in part on the composer-merge-plugin – thank you!
License: MIT
© 2016 The Open University. (Institute of Educational Technology)
nfreear/composer-suggest 适用场景与选型建议
nfreear/composer-suggest 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 329 次下载、GitHub Stars 达 4, 最近一次更新时间为 2015 年 05 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「pattern」 「regex」 「composer-plugin」 「suggest」 「LACE」 「OpenUniversity」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 nfreear/composer-suggest 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nfreear/composer-suggest 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 nfreear/composer-suggest 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Composer plugin for preserving custom paths and supporting nested packages
Advanced TYPO3 redirect management for sys_redirect with regex and host/language-aware matching, CSV/.htaccess import/export, categories and priority, automatic slug redirect workflows, plus hit/log analytics.
Composer plugin
A Laravel package for the Repository Design Pattern.
Adds PHP's preg_replace function as a Twig filter.
Convert Regular Expressions into text, for testing
统计信息
- 总下载量: 329
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 21
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-07