Open Itebo-E-Services-Development opened 1 year ago
I see the same issue while running Symfony v5.4 - the symfony/var-exporter
is not honoring the Symfony restriction to 5.4. and instead it loads the v6.3.. Specifically, with v5.4.32, symfony/var-exporter loaded is v.6.3.6.
My symfony restrictions are like this
"extra": {
"symfony": {
"allow-contrib": true,
"require": "5.4.*",
"docker": true
}
},
@amici do you have the symfony/flex
plugin installed and allowed? Can you provide a reproducer with a composer.json.
I don't have a link but IIRC we did this on purpose to allow installing recent Doctrine versions (that require a recent VarExporter) together with Symfony 5.4 (or 4.4 in your case).
@amici do you have the
symfony/flex
plugin installed and allowed? Can you provide a reproducer with a composer.json.
Yes, I do have the symfony/flex
running, v2.4.2. I'm not sure what do you mean by "allowed".
I will try in next days to get a reproducer, but I need to shorten my composer.json since it has a lot of things.
Unless, as @nicolas-grekas mentioned in earlier ticket - it was actually done on purpose, to allow the recent Doctrine versions to be installed. Then there's no point in reproducing it.
Hello 👋
Currently we are in the process of upgrading an old symfony project of ours from
3.4
to5.4
/6.x
and already made the transition from the old directory structure to the newer one from flex.As we are upgrading from
3.4
to4.4
to see all deprecations for that major version, I noticed that not all dependencies fromsymfony/*
are restricted to4.4.*
or4.*
even, assymfony/var-exporter
is installed with version5.4.21
.composer.json
Output of
composer update "symfony/*" swiftmailer/swiftmailer --dry-run
(swiftmailer needed because of dependencies, will migrate tosymfony/mailer
next):This would be of course because of the package
symfony/cache:4.4.48
with its requirement forsymfony/var-exporter: ^4.2|^5.0
, validated by runningcomposer depends symfony/var-exporter
after running the update. This can also be reproduced when just creating a new skeleton project withcomposer create-project symfony/skeleton:4.4.*
.Apparently, flex looks at the dependency and picks the highest version possible (
5.4.21
in this case).Now my question is: is this intended behaviour, a bug or something I'm missing here?
I expected all packages
symfony/*
to be limited to4.4.*
from what I understood how flex works, so I am just wondering. At first, I thought this to be related to issues #971/#1181, but that problem was fixed some time ago.From reading some of the source code of this plugin I got the impression, that the contents of the index.json from the flex recipe is relevant for this, but couldn't really figure out how.
Thanks to anyone being able to shed some light on this.