2017 © Pedro Peláez
 

composer-plugin composer-generate-metadata

Composer plugin for generate Drupal packages metadata into info files

image

drustack/composer-generate-metadata

Composer plugin for generate Drupal packages metadata into info files

  • Saturday, February 18, 2017
  • by hswong3i
  • Repository
  • 3 Watchers
  • 0 Stars
  • 1,022 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 3 % Grown

The README.md

Composer Generate Metadata

Build
Status Coverage
Status Latest Stable
Version Total
Downloads License, (*1)

Composer plugin for generate Drupal packages metadata into info files., (*2)

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., (*3)

This way you can:, (*4)

  • 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:, (*5)

; 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:, (*6)

# 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:, (*7)

$ 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., (*8)

Drupal.org provides two separate composer repository endpoints: one for Drupal 7 and one for Drupal 8., (*9)

To add the repository from the command line you should execute the following command from your repository root:, (*10)

$ 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:, (*11)

{
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/7"
        }
    ]
}

Example

An example composer.json:, (*12)

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

The Versions

18/02 2017

dev-master

9999999-dev

Composer plugin for generate Drupal packages metadata into info files

  Sources   Download

GPL-2.0+

The Requires

  • composer-plugin-api ~1.0

 

The Development Requires

installer drupal composer-plugin

18/02 2017

1.0.2

1.0.2.0

Composer plugin for generate Drupal packages metadata into info files

  Sources   Download

GPL-2.0+

The Requires

  • composer-plugin-api ~1.0

 

The Development Requires

installer drupal composer-plugin

18/02 2017

dev-develop

dev-develop

Composer plugin for generate Drupal packages metadata into info files

  Sources   Download

GPL-2.0+

The Requires

  • composer-plugin-api ~1.0

 

The Development Requires

installer drupal composer-plugin

18/02 2017

1.0.1

1.0.1.0

Composer plugin for generate drupal packages metadata into info files

  Sources   Download

GPL-2.0+

The Requires

  • composer-plugin-api ~1.0

 

The Development Requires

installer composer-plugin

17/02 2017

1.0.0

1.0.0.0

Composer plugin for generate drupal packages metadata into info files

  Sources   Download

GPL-2.0+

The Requires

  • composer-plugin-api ~1.0

 

The Development Requires

installer composer-plugin

17/02 2017

0.0.2

0.0.2.0

Composer plugin for generate drupal packages metadata into info files

  Sources   Download

GPL-2.0+

The Requires

  • composer-plugin-api ~1.0

 

The Development Requires

installer composer-plugin

17/02 2017

0.0.1

0.0.1.0

Composer plugin for generate drupal packages metadata into info files

  Sources   Download

GPL-2.0+

The Requires

  • composer-plugin-api ~1.0

 

The Development Requires

installer composer-plugin