eiriksm / semver-to-drupal
Convert semver versions to Drupal git tags.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/eiriksm/semver-to-drupal
Requires (Dev)
- phpunit/phpunit: ^5.7
- satooshi/php-coveralls: ^1.0
This package is auto-updated.
Last update: 2025-09-29 01:32:09 UTC
README
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.