New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu: Custom version string messes with version comparison checks #4319
Comments
|
Well, the version comparison is not messed up. The only thing being messed up is the display of the php version in error messages (it should take it from |
|
Yes, the error it is actually throwing is that "5.3.9" is below the requirement of ">=5.4.0". But in the error it displays the actual PHP version, not the one defined through "config.platform.php". |
|
Not so easy to fix it turns out. Might be able to make the message more clear for the time being however. Duplicate of #2697 also. |
* determine conflicting version in problem using pool package * hide version in rule to keep it generic rather than possibly misleading fixes composer#4319
|
so how to fix this please ?
|
|
In your case you simply don't have the required php version. Upgrade your
|
|
I have the same error, described here My php version is 5.5.31. The error i am getting says :
5.5.3 > 5.4.0 thus there should not be error. |
|
Seems a solution can be to use flag --ignore-platform-reqs |
|
@gintares Are you sure you do not have a custom PHP version configured in your |
|
@xabbuh if he is using the latest Composer version, then that custom version should now be rendered in this message. |
|
@alcohol So the string |
|
Huh, seems I am mistaken:
I thought we worked on this a while ago. |
|
Yeah see #4321. Not sure which of the messages is displayed here though. |
|
So there's a fix for this yet? I'm using the latest version of composer and when adding packages to a Symfony2 installation I'm getting the same errors. I use Ubuntu as well. |
|
@elvismdev if you do not share your composer.json with us, we cannot help you. |
|
Sure, here below my composer.json file. |
|
@elvismdev near the end of that file, platform = 5.3.9. |
|
What @cs278 said. Because you specify a specific php version under platform, Composer will treat that version as the "installed" php version, and 5.3.9 is < 5.5. |
The
config.platform.phpsetting is currently messing up the version comparison checks in Composer on Ubuntu (14.04.1, Linux 3.16.0-45, x86_64). Without the setting, everything installs correctly without errors; however the following error occurs when it is present:Since this custom version string will occur on every single installation of PHP installed through Ubuntu's package manager (default repositories), this will affect many people - especially since Symfony are now using the
config.platform.phpsetting in their new Demo application since v0.4.0.The
composer.jsonfile I used to test this is as follows:{ "name": "composer/version-resolution-issue", "description": "", "minimum-stability": "dev", "require": { "humbug/humbug": "dev-master" }, "config": { "platform": { "php": "5.3.9" } } }Since I'm referencing the
masterbranch ofhumbug/humbugand liable to change, the commit at the time of testing was humbug/humbug@facf911.The text was updated successfully, but these errors were encountered: