drustack/composer-generate-metadata
Composer 安装命令:
composer require drustack/composer-generate-metadata
包简介
Composer plugin for generate Drupal packages metadata into info files
README 文档
README
Composer plugin for generate Drupal packages metadata into info files.
By default packages (e.g. modules, themes and profiles) downloaded from
https://drupal.org/ will be injeted with metadata info its .info or
.info.yml, so update.module will able to figure out if corresponding
version installed are outdated or not. By the way, if you download
packages with GIT directly, e.g. install -dev release by using
Composer, such metadata info won't exists and so update.module will
report with unknown version.
This way you can:
- Generate version information for
.infofiles in ini format - Generate version information for
.info.ymlfiles in YAML format - Compute the rebulid version string for a project, by does some magic in Git to find the latest release tag along the branch we're packaging from, count the number of commits since then, and use that to construct this fancy alternate version string which is useful for the version-specific dependency support in Drupal 7 and higher
In case of Drupal 7.x, following metadata will be injected into .info
file:
; Information add by drustack/composer-generate-metadata on 2017-02-18
project = "features"
core = "7.x"
version = "7.x-2.10+3-dev"
datestamp = "1487399547"
In case of Drupal 8.x, following metadata will be injected into
.info.yml file:
# Information add by drustack/composer-generate-metadata on 2017-02-18
project: "features"
version: "8.x-3.2+1-dev"
datestamp: "1487399552"
Installation
Simply install the plugin with composer:
$ composer require drustack/composer-generate-metadata:~2.0
Configuration
Drupal projects are not listed on Packagist. Instead, Drupal.org provides its own directory of Drupal projects for Composer to use. Therefore you will need to add Drupal.org as a Composer Repository to your Drupal site's composer.json file.
Drupal.org provides two separate composer repository endpoints: one for Drupal 7 and one for Drupal 8.
- To use Composer with Drupal 7, use the repository url https://packages.drupal.org/7
- To use Composer with Drupal 8, use the repository url https://packages.drupal.org/8
To add the repository from the command line you should execute the following command from your repository root:
$ composer config repositories.drupal composer https://packages.drupal.org/7
Composer will then automatically update your Drupal site's composer.json file with a repositories object of the format:
{
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/7"
}
]
}
Example
An example composer.json:
{
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/7"
}
],
"require": {
"drupal/drupal": "~7.54",
"drupal/features": "2.x-dev",
"drustack/composer-generate-metadata": "~2.0"
}
}
License
Author Information
- Wong Hoi Sing Edison
drustack/composer-generate-metadata 适用场景与选型建议
drustack/composer-generate-metadata 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.67k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 02 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「installer」 「drupal」 「composer-plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 drustack/composer-generate-metadata 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 drustack/composer-generate-metadata 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 drustack/composer-generate-metadata 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Provides an add-on purchasable entity.
Installs Aura packages to the Aura system "package" directory.
Composer plugin for preserving custom paths and supporting nested packages
Drupal integration module for the Kalastatic prototyping and styleguide tool
Provides a base set of configuration and module dependencies for starting new Drupal projects.
Composer plugin
统计信息
- 总下载量: 1.67k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 9
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2017-02-17