Skip to main content

allow_updates_beyond_constraint

Configuration

name: allow_updates_beyond_constraint
type: int
default: 1
{
"name": "company/project",
"extra": {
"violinist": {
"allow_updates_beyond_constraint": 1
}
}
}

Indicate whether or not we can try to update a package even if it is beyond the range specified in composer.json. Defaults to 1 (true).

Explanation

Strictly speaking, if your composer.json specifies that you want to have the package vendor/package in the version range ~1.0.0, then composer will install all version in the range 1.0.x, but refuse to update it to 1.1.0. Some times this is what you want. But many times, a new version at 1.1.0 will include new features and be backwards compatible. So maybe you actually might want to start using that version instead? This is what the option for allowing to update beyond your version constraint does.

Example

Say you depend on the project vendor/package in range ~1.0.0. And say the latest version is 1.1.0. And say you actually do not want to receive this update via Violinist. And say your composer.json looks something like this:

{
"name": "company/project",
"description": "My awesome project",
"require": {
"vendor/package": "~1.0.0",
}
}

To make Violinist stop trying to update vendor/package (and all other pages) beyond your specified version range you simply add the following to your composer.json:

{
"name": "company/project",
"description": "My awesome project",
"require": {
"vendor/package": "~1.0.0",
},
"extra": {
"violinist": {
"allow_updates_beyond_constraint": 0
}
}
}