malukenho/mcbumpface

Bumping into packages

Fund package maintenance!
malukenho

Installs: 132 896

Dependents: 29

Suggesters: 0

Security: 0

Stars: 102

Watchers: 5

Forks: 10

Open Issues: 3

Type:composer-plugin

1.1.5 2020-10-29 20:32 UTC

This package is auto-updated.

Last update: 2021-11-23 20:26:26 UTC


README

A simple tool to sync composer.lock and composer.json versions, resulting in a faster package dependencies resolution.

Installing

composer require --dev malukenho/mcbumpface

How it works?

By looking at the composer.lock file which is (re)generated during composer install or composer update we can replace the required version specified on composer.json file by the installed version specified on composer.lock file.

Example

composer.json (before)
{
    "require": {
        "malukenho/docheader": "^1.0.1"
    }
}

After a composer update, composer have installed version ^1.0.4, so my composer.json will looks like the following:

composer.json (after)
{
    "require": {
        "malukenho/docheader": "^1.0.4"
    }
}

Configuration (optional)

By adding an extra configuration to the projects composer.json, you can configure different behavior of the version bumping. The configuration can be added like this:

{
    "extra": {
        "mc-bumpface": {
            "stripVersionPrefixes": false
        }
    }
}

The following configurations are available:

stripVersionPrefixes (default: false)

By setting this parameter to true, mcbumpface will strip the v prefix from versions (in case they are tagged like this).