Composer: Take symfony compatibility into account when suggesting changes #31910
Replies: 4 comments 11 replies
-
Hi there, Get your discussion fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. Discussions without reproductions are less likely to be converted to Issues. Please follow these steps:
If you need help with running renovate on your minimal reproduction repository, please refer to our Running Renovate guide. The Renovate team |
Beta Was this translation helpful? Give feedback.
-
Please use the reproduction template above and make note of the instructions, e.g.
|
Beta Was this translation helpful? Give feedback.
-
Which of these two are you meaning?
|
Beta Was this translation helpful? Give feedback.
-
I managed to get a workaround for this, by using composer's In
This mimics Maintaining this can be a bit tedious though, so I think a more proper solution is still desired. |
Beta Was this translation helpful? Give feedback.
-
Starting this discussion based on the request @rarkins made in #24723 (comment)
Symfony has multiple release branches. At the time of writing the
7.x
releases are rolling releases and the6.4.*
releases are LTS (Long Term Support) releases.If a developer chooses to follow the LTS branch, he/she installs
symfony/flex
and setsextra.symfony.require
to the required version. This way, packagesrequire
ing other packages under the "Symfony umbrella" (more about that later) will be restricted to the constraint inextra.symfony.require
.See this
composer.json
snippet as an example:Package
gedmo/doctrine-extensions
has"symfony/cache": "^5.4 || ^6.0 || ^7.0"
as a requirement. Becausesymfony/flex
hooks intocomposer
, the installedsymfony/cache
version will be the one compliant with6.4.*
.Renovate doesn't have this logic on board, resulting in a PR with a (undesired) bump to a
symfony/cache
matching^7.0
.Symfony superstar @nicolas-grekas explains what is considered to be under the "Symfony umbrella" here #24723 (comment)
The flex hook can be found here: https://github.com/symfony/flex/blob/2.x/src/PackageFilter.php#L104
I created a test repo which reproduces this issue at https://github.com/petski/renovate-31910.
If Renovate suggests a major Symfony bump (i.e. from 6.4.x to 7.x),
extra.symfony.require
should also be bumped accordingly.Beta Was this translation helpful? Give feedback.
All reactions