PHPackages                             drustack/composer-generate-metadata - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. drustack/composer-generate-metadata

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

drustack/composer-generate-metadata
===================================

Composer plugin for generate Drupal packages metadata into info files

2.0.1(9mo ago)11.7k[2 PRs](https://github.com/drustack/composer-project-composer-generate-metadata/pulls)3GPL-2.0+PHPCI passing

Since Feb 17Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/drustack/composer-project-composer-generate-metadata)[ Packagist](https://packagist.org/packages/drustack/composer-generate-metadata)[ RSS](/packages/drustack-composer-generate-metadata/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (24)Used By (3)

Composer Generate Metadata
==========================

[](#composer-generate-metadata)

[![Build Status](https://camo.githubusercontent.com/c9e9d8ac7492d90932a1ea04db0176eb5528c7e05e2a64986385d661ad388be6/68747470733a2f2f7472617669732d63692e6f72672f647275737461636b2f636f6d706f7365722d67656e65726174652d6d657461646174612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/drustack/composer-generate-metadata)[![Coverage Status](https://camo.githubusercontent.com/6180194c1e67bb540db6aebcb7ef3627dde4ecf40c3d1373b4ec2d3595f6a876/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f647275737461636b2f636f6d706f7365722d67656e65726174652d6d657461646174612f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/drustack/composer-generate-metadata?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/a2dfb2a19582d9f78d2b180484fd463135204ffa525a9b2d007331a1258734b7/68747470733a2f2f706f7365722e707567782e6f72672f647275737461636b2f636f6d706f7365722d67656e65726174652d6d657461646174612f762f737461626c652e737667)](https://packagist.org/packages/drustack/composer-generate-metadata)[![Total Downloads](https://camo.githubusercontent.com/ea65d3fcb6a8d9edf5c5f5d2319daae081513bbd9ad2a317811950bfc2dfac08/68747470733a2f2f706f7365722e707567782e6f72672f647275737461636b2f636f6d706f7365722d67656e65726174652d6d657461646174612f646f776e6c6f6164732e737667)](https://packagist.org/packages/drustack/composer-generate-metadata)[![License](https://camo.githubusercontent.com/6fcb03f5c34af1667297282960cce381374e0583db4967006539949c365290d2/68747470733a2f2f706f7365722e707567782e6f72672f647275737461636b2f636f6d706f7365722d67656e65726174652d6d657461646174612f6c6963656e73652e737667)](https://packagist.org/packages/drustack/composer-generate-metadata)

Composer plugin for generate Drupal packages metadata into info files.

By default packages (e.g. modules, themes and profiles) downloaded from  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 `.info` files in ini format
- Generate version information for `.info.yml` files 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
------------

[](#installation)

Simply install the plugin with composer:

```
$ composer require drustack/composer-generate-metadata:~2.0

```

Configuration
-------------

[](#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
- To use Composer with Drupal 8, use the repository url

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
-------

[](#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
-------

[](#license)

- Code released under [GPL-2.0+](https://github.com/drustack/composer-generate-metadata/blob/master/LICENSE)
- Docs released under [CC BY 4.0](http://creativecommons.org/licenses/by/4.0/)

Author Information
------------------

[](#author-information)

- Wong Hoi Sing Edison
    -
    -

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance74

Regular maintenance activity

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~161 days

Recently: every ~384 days

Total

20

Last Release

298d ago

Major Versions

0.0.2 → 1.0.02017-02-17

1.0.7 → 2.0.0-alpha12021-03-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/8dc67be71c6d9a9242bfe0db8d0293a7a0731c35f6f9d6ae72ab13ba90af519f?d=identicon)[hswong3i](/maintainers/hswong3i)

---

Top Contributors

[![hswong3i](https://avatars.githubusercontent.com/u/780562?v=4)](https://github.com/hswong3i "hswong3i (74 commits)")

---

Tags

drupalinstallercomposer-plugin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/drustack-composer-generate-metadata/health.svg)

```
[![Health](https://phpackages.com/badges/drustack-composer-generate-metadata/health.svg)](https://phpackages.com/packages/drustack-composer-generate-metadata)
```

###  Alternatives

[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M14](/packages/vaimo-composer-patches)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M440](/packages/drupal-core-composer-scaffold)[mnsami/composer-custom-directory-installer

A composer plugin, to help install packages of different types in custom paths.

1395.0M52](/packages/mnsami-composer-custom-directory-installer)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[drupal-composer/preserve-paths

Composer plugin for preserving custom paths and supporting nested packages

271.1M5](/packages/drupal-composer-preserve-paths)[typisttech/imposter-plugin

Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

158251.0k2](/packages/typisttech-imposter-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
