Skip to content
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

Wrong displayed version after downgrading dependency #33

Open
rmasclef opened this issue Jan 22, 2016 · 1 comment
Open

Wrong displayed version after downgrading dependency #33

rmasclef opened this issue Jan 22, 2016 · 1 comment

Comments

@rmasclef
Copy link

Hi,

I may have found an issue with the displaying of the current installed version of a subdependency after downgrading it.

For example, when I downgrade the symfony-framework-bundle dependency from 2.8 to 2.3, the composer-versions-check display me this for the http-kernel sub-dependency :

symfony/http-kernel (v2.8.2) last version is v3.0.1

The dependecies are well displayed, but the sub-dependencies seems not to be handle well.

composer_version_checker

@rmasclef
Copy link
Author

It looks like it is not an issue ...

The dependencies definied in some sub-dependencies (ex: framework-bundle) are set with ~2.3 in the composer.json of the dependency.

This appears to allow composer to download the latest 2.x version (2.8) which, as I think, is really wrong.


If we take a look at symfony/framework-bundle

The 2.3 version of symfony/framework-bundle requires php 5.3.3 and symfony/config component ~2.3 (which allows 2.8).
If we take a look at symfony/config component in 2.8 version, it requires php 5.3.9 which is not good at all if we use a server running php 5.3.3 (centOS 6 server for example).

Here is an example:

If we take a look at symfony/framework-bundle

  • The 2.3 version of symfony/framework-bundle requires php 5.3.3 and symfony/config component ~2.3 (which allows 2.8).
  • The symfony/config component in 2.8 version requires php 5.3.9 which is not good at all if we use a server running php 5.3.3 (centOS 6 server for example).

A little bit of code

If we launch a composer install with a PHP Client having PHP5.4 (YES it is completly dumb not to use the same php version in dev as in prod), the subdependencies will be installed with the 2.8version and then, a composer install will fail in production environment.

We need to add those lines in the composer.json in order to force the 2.3 version to be installed:

"conflict": {
      "symfony/config": "2.3",
      "symfony/console": "2.3",
      "symfony/debug": "2.3",
      "symfony/doctrine-bridge": "2.3",
      "symfony/dom-crawler": "2.3",
      "symfony/event-dispatcher": "2.3",
      "symfony/filesystem": "2.3",
      "symfony/http-kernel": "2.3",
      "symfony/http-foundation": "2.3",
      "symfony/routing": "2.3",
      "symfony/stopwatch": "2.3",
      "symfony/templating": "2.3",
      "symfony/translation": "2.3",
      "symfony/yaml": "2.3"
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant