I needed a xml serializer for a legacy app runing on php5. I have tried to install symfony/serializer@3.4.47, whitch should work in my env.
It seem that it is not possible:
$ composer require symfony/serializer=v3.4.47
[...]
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires symfony/serializer v3.4.47 -> satisfiable by symfony/serializer[v3.4.47].
- symfony/serializer v3.4.47 conflicts with symfony/serializer v3.4.47.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Actually, it is not possible to install this package when platform is set to php 5, as every compatibile version conflicts with itself.
- Is it some kind of lock to prevent instalation of packages containing security issues?
- Is it possible to force composer to install such conflicting package, besides forking it?
EDIT:
@Nico Haase requested comparision of composer.json before and after the changes.
Here are changed fragments of it:
{
"name": "my/library",
"description": "I'll omit irrelevant and/or unchanged parts",
"config": {
"platform": {
- "php": "5.4.45"
+ "php": "5.6.40"
}
},
"require-dev": {
"phpunit/phpunit": "^4.8",
"wsdl2phpgenerator/wsdl2phpgenerator": "^3.4"
},
"require": {
"my/library1": "^221.0.2",
"my/library2": "dev-master",
"my/library3": "dev-master",
"my/library4": "dev-master",
"ext-soap": "*",
+ "ext-json": "*",
+ "symfony/serializer": "v3.4.47",
+ "symfony/property-access": "^3.4"
}
}
As you can see, there were no symfony packages required before changes, so I was not expected it to be installed. But it was, as a dev-dependency of wsdl2phpgenerator and it was very old. As per composer.lock the installed version was v2.8.52.
Full update of composer packages along with PHP version bump from 5.4 (which was used when this lib was previously touched) to 5.6 we are using now allowed dependencies to be upgrade to compatible versions.
All of this would not be a problem if it was not for the weird composer conflict message:
- symfony/serializer v3.4.47 conflicts with symfony/serializer v3.4.47.
I would expect it to be something along:
- symfony/serializer v3.4.47 requires symfony/yaml v3.4.47
- symfony/yaml v3.4.7 confitcs with symfony/yaml v2.8.52
...or something similar, which would hint me in direction of updating dependencies.