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

issues updating from 2.8.3 using Composer #7179

Closed
craue opened this issue Feb 11, 2015 · 6 comments
Closed

issues updating from 2.8.3 using Composer #7179

craue opened this issue Feb 11, 2015 · 6 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@craue
Copy link
Contributor

craue commented Feb 11, 2015

I'm using Composer for a project which only requires Piwik as a dependency, so my composer.json looks like this:

{
    "type": "project",
    "require": {
        "piwik/piwik": "~2.0"
    }
}

As Piwik 2.8.3 is the last tag with only stable dependencies, there are some issues while trying to update to 2.9.0 (which requires "mnapoli/php-di": "5.0.x-dev") or 2.10.0 (which also requires "doctrine/cache": "dev-filecache-race-condition-fix as 1.3.1").

We have two issues here:

  1. Because the minimum-stability setting defaults to stable, no stable version for the 5.0.x-dev branch of mnapoli/php-di can be found and Composer complains with piwik/piwik 2.9.0 requires mnapoli/php-di 5.0.x-dev -> no matching package found. The commit which introduced this is f5b6b4c. The solution would be to tag a stable release. /cc @mnapoli
  2. Inline aliases don't work well in published packages and using them should be avoided. The commit which introduced this is 41a0e0d. The solution would be to fix the issue (which the custom branch is addressing) upstream and require a proper version of doctrine/cache. (Or is it already solved in 1.4.0?)

To successfully update my project to Piwik 2.10.0 while having these two issues I would need to change my composer.json to this, which is definitely bad:

{
    "type": "project",
    "require": {
        "piwik/piwik": "~2.0",
        "doctrine/cache": "dev-filecache-race-condition-fix as 1.3.1"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/piwik/cache.git"
        }
    ]
}

Would be nice if both issues could be solved prior to releasing Piwik 2.11.0.

@mnapoli
Copy link
Contributor

mnapoli commented Feb 11, 2015

  1. Impossible to tag a new release unfortunately (the v5 is not finished), and I guess a beta wouldn't change much. Using minimum-stability isn't possible?
  2. 1.4.0 contains the fix so we could solve this one

@craue
Copy link
Contributor Author

craue commented Feb 11, 2015

Maybe requiring "mnapoli/php-di": "~5.0@dev" instead would solve the issue, but I don't know for sure and it's still bad to rely on an unstable dependency.

@mnapoli
Copy link
Contributor

mnapoli commented Feb 11, 2015

~5.0@dev wouldn't work because it doesn't apply to the root composer.json, minimum-stability is the only solution.

It's not an unstable dependency in the sense that it's completely controlled with each update (I maintain PHP-DI). It's kind like a rolling release, except we have the liberty to break BC because only Piwik is using it (+ some of my projects). The goal is to develop 5.0 while confronting the choices made to real-life scenarios in Piwik and being able to adjust and break BC when we want (that's why 5.0 is not tagged yet). In a few months (maybe next release) 5.0 should be tagged.

@craue
Copy link
Contributor Author

craue commented Feb 11, 2015

only Piwik is using it (+ some of my projects)

How can you know? 😏

But solving the doctrine/cache dependency issue would be a good start. Will you change that or shall I create a PR?

@mnapoli
Copy link
Contributor

mnapoli commented Feb 11, 2015

I'll fix the doctrine requirement.

How can you know? 😏

Of course anybody can use it ;) but for them it's "unstable". For Piwik it's not because I update Piwik as soon as I update PHP-DI, it's like a joint development, like if PHP-DI 5 was an "internal" fork. Anybody could use it, but there's no guarantee of anything for them.

@mnapoli
Copy link
Contributor

mnapoli commented Feb 11, 2015

Forgot to reference the commit, here it is: f82a2d4!

@mnapoli mnapoli closed this as completed Feb 11, 2015
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants