eiriksm/semver-to-drupal

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
There is no license information available for the latest version (dev-master) of this package.

Convert semver versions to Drupal git tags.

dev-master 2017-07-23 12:27 UTC

This package is auto-updated.

Last update: 2021-05-29 01:04:08 UTC


README

Build Status Coverage Status

What is it?

A super small library to convert semver versions to Drupal git tags.

Why is it?

On Violinist.io, the continuous automatic composer updater, we retrieve the changelog between versions when we create pull requests to your projects. So to retrieve these based on your composer files, we need to convert between these formats.

Installation

composer require semver-to-drupal

Usage

<?php

use eiriksm\SemverToDrupal\Converter;

// Default usage, assumes major version 8.
print Converter::convertToDrupal('1.0.0'); // Prints 8.x-1.0.
// Usage with Drupal version 7.
print Converter::convertToDrupal('1.16.0', 7); // Prints 7.x-1.16.