Tech

PHP Version Constraints for Renovate Bot

Following the release of PHP 8.5, we encountered some problems with Renovate Bot’s dependency updates. It appeared that Renovate Bot was using the latest PHP version for running dependency upgrades, which caused quite a few dependency updates to fail.

While checking the docs, I realized that Renovate Bot does not apply language constraints to upgrades at all.

Fortunately, Renovate Bot allows you to define language constraints for dependency upgrades, providing a solution to this problem. To resolve the issue, we added the following configuration to the renovate.json file:

{
"constraints": {
"php": "8.4.x",
"composer": "2.x"
}
}

By implementing this constraint configuration, we can ensure that Renovate Bot consistently uses PHP 8.4 and Composer 2 for dependency updates.

However, this setup has a trade-off: once PHP 8.4 and Composer 2 become outdated, Renovate will no longer automatically update them. Instead, you will need to manually update these versions to keep them current.

Source link

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close

Adblock Detected

kindly turn off ad blocker to browse freely