PHPackages                             martinsr/constraint-updater - 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. martinsr/constraint-updater

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

martinsr/constraint-updater
===========================

2.0.1(2y ago)21.7k3[7 issues](https://github.com/MartinsRucevskis/composer-constraint-updater/issues)MITPHPPHP ^8.1

Since Nov 13Pushed 2y ago2 watchersCompare

[ Source](https://github.com/MartinsRucevskis/composer-constraint-updater)[ Packagist](https://packagist.org/packages/martinsr/constraint-updater)[ RSS](/packages/martinsr-constraint-updater/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (8)Versions (18)Used By (0)

Composer constraint updater
===========================

[](#composer-constraint-updater)

[![Tests](https://github.com/MartinsRucevskis/composer-constraint-updater/actions/workflows/php-unit.yml/badge.svg)](https://github.com/MartinsRucevskis/composer-constraint-updater/actions/workflows/php-unit.yml)[![Code style](https://github.com/MartinsRucevskis/composer-constraint-updater/actions/workflows/php-cs-fixer.yml/badge.svg)](https://github.com/MartinsRucevskis/composer-constraint-updater/actions/workflows/php-cs-fixer.yml)[![Static analysis](https://github.com/MartinsRucevskis/composer-constraint-updater/actions/workflows/php-stan.yml/badge.svg)](https://github.com/MartinsRucevskis/composer-constraint-updater/actions/workflows/php-stan.yml)[![codecov](https://camo.githubusercontent.com/e4da932d88271b99137743254d05873ae2d980cefaec99dc847db7448c71a202/68747470733a2f2f636f6465636f762e696f2f67682f4d617274696e735275636576736b69732f636f6d706f7365722d636f6e73747261696e742d757064617465722f67726170682f62616467652e7376673f746f6b656e3d4548495a514e4a334343)](https://codecov.io/gh/MartinsRucevskis/composer-constraint-updater)

---

Helps You automatically resolve composer conflicts

E.g. Need to upgrade your framework to the newest version? Just run

```
composer major-update --constraint=package/package:^10.0
```

Want to upgrade minor versions and also update your compose.json file to the up-to-date versions? Run

```
composer minor-update

```

Installation
------------

[](#installation)

Use composer to automatically add it Your project

```
composer require martinsr/constraint-updater
```

How to use
----------

[](#how-to-use)

- Add it to Your project
- Specify Your needed constraints when running `composer major-update`

```
--constraint=package/package:^10.0
```

- Run the either `composer major-update` or `composer minor-update` with your params.

How it works
------------

[](#how-it-works)

### major-update

[](#major-update)

It will replace all your `composer.json` package versions with `*` except for packages You have added with `--constraint`.

Versions you add for the packages will be taken literally.

#### Examples:

[](#examples)

`constraint=laravel/framework:^10.0` will set the version to `^10.0` `constraint=laravel/framework:10.0` will set it to `10.0`.

Would suggest to always add the `^` since composer will still keep the major version the same, while updating to the newest minor version other packages support.

This will make composer install the most up-to-date versions possible, taken the constraints and there won't be any conflicts as long as there is a supported version.

After composer update has been run, it will fix your `composer.json` file from versions that were installed and specified in Your `composer.lock`

minor-update
------------

[](#minor-update)

This will run `composer update` and after that fix the `composer.json` with the actual versions that were installed.

#### Examples:

[](#examples-1)

Run

```
composer minor-update
```

Will run composer update command, and rebuild composer.json file to have up-to-date dependencies with the lock file

How to contribute
=================

[](#how-to-contribute)

1. Select a GitHub issue or create one
2. Pull the repository locally
3. For development use PHP 8.1
4. Run `composer install`
5. To check if everything is set up, run tests with `composer test`
6. Make your changes, add tests and fix code quality
7. Submit a pull request!🎉

Code quality
------------

[](#code-quality)

To run complete code quality use:

```
composer code-quality
```

To run rector use:

```
composer rector
```

To run php-stan use:

```
composer php-stan
```

To convert unsafe functions use:

```
composer use-safe
```

To fix code styling use:

```
composer php-cs-fixer
```

Testing
-------

[](#testing)

To run tests use

```
composer test
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

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 ~11 days

Total

6

Last Release

854d ago

Major Versions

1.2.1 → 2.02024-01-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/482f379667fe66efb11ddcd3217f32ecfb9a017b24bc721c227e71d8f666fa75?d=identicon)[MartinsRucevskis](/maintainers/MartinsRucevskis)

---

Top Contributors

[![MartinsRucevskis](https://avatars.githubusercontent.com/u/93941023?v=4)](https://github.com/MartinsRucevskis "MartinsRucevskis (10 commits)")

---

Tags

composercomposer-plugincomposer2constraints

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/martinsr-constraint-updater/health.svg)

```
[![Health](https://phpackages.com/badges/martinsr-constraint-updater/health.svg)](https://phpackages.com/packages/martinsr-constraint-updater)
```

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[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.3M16](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[laragraph/utils

Utilities for using GraphQL with Laravel

2113.8M7](/packages/laragraph-utils)

PHPackages © 2026

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