Skip to main content

ignore_platform_requirements

Configuration

name: ignore_platform_requirements
type: int
default: 0
{
"name": "company/project",
"extra": {
"violinist": {
"ignore_platform_requirements": 0
}
}
}

Ignore PHP platform requirements when checking for updates.

Explanation

When enabled, Violinist will set the COMPOSER_IGNORE_PLATFORM_REQS environment variable. This tells Composer to ignore platform requirements (PHP version, extensions, etc.) when resolving and updating dependencies.

This can be useful when the PHP version or extensions available in Violinist's environment differ from your production environment.

Example

Say your production environment uses a PHP extension that isn't universally available. Without this option, Composer might refuse to update packages because the extension isn't present when checking for updates. To work around this, enable ignore_platform_requirements:

{
"name": "company/project",
"description": "My awesome project",
"require": {
"php": "^8.2",
"ext-acme": "*",
"vendor/package": "~1.0.0"
},
"extra": {
"violinist": {
"ignore_platform_requirements": 1
}
}
}
note

ext-acme is a fictional extension used for illustration purposes.

With this configuration, Violinist will ignore platform requirements and proceed with checking for updates. Your CI pipeline should still verify that the updated dependencies work correctly with your actual platform configuration.