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

Composer updates dependencies over and over again #6218

Closed
kocsismate opened this issue Mar 1, 2017 · 4 comments
Closed

Composer updates dependencies over and over again #6218

kocsismate opened this issue Mar 1, 2017 · 4 comments
Labels

Comments

@kocsismate
Copy link
Contributor

My composer.json:

{
    ...
    "require": {
        "php": "^7.1",
        ...
        "woohoolabs/zen": "^2.0.0",
        "zendframework/zend-diactoros": "^1.3.8"
    },
    ...
}

Output of composer diagnose:
All checks are OK.

When I run this command:

composer update

I get the following output even though nothing has changed since the last update:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 2 updates, 0 removals
  - Updating woohoolabs/zen (2.0.0 => 2.0.0) Loading from cache
  - Updating zendframework/zend-diactoros (1.3.10 => 1.3.10) Loading from cache
Generating autoload files

And I expected this to happen:
Already up-to-date packages shouldn't be updated again. I even tried to delete the vendor folder, along with the composer.lock file and the cache dir but it didn't help. Sorry if this issue is a duplicate, I couln't find a similary one after a quick search.

@curry684
Copy link
Contributor

curry684 commented Mar 2, 2017

I cannot reproduce your case with the supplied minimal example:

$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 7 installs, 0 updates, 0 removals
  - Installing php-di/phpdoc-reader (2.0.1) Downloading: 100%         
  - Installing doctrine/lexer (v1.0.1) Loading from cache
  - Installing doctrine/annotations (v1.4.0) Loading from cache
  - Installing psr/container (1.0.0) Downloading: 100%         
  - Installing woohoolabs/zen (2.0.0) Downloading: 100%         
  - Installing psr/http-message (1.0.1) Loading from cache
  - Installing zendframework/zend-diactoros (1.3.10) Downloading: 100%         
Writing lock file
Generating autoload files
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
$ 

Can you try to provide a minimum setup that reproduces the issue? Also please try with both the stable and snapshot versions of Composer (composer help self-update) and provide the version numbers that display the issue if not all of them.

@alcohol alcohol added the Support label Mar 2, 2017
@kocsismate
Copy link
Contributor Author

@curry684 I managed to reproduce this issue with all the three channels of composer (I was originally using 1.3.2 stable) but more importantly, I found what causes the problem by removing my deps until my issue gets fixed:

So requiring psr/container-implementation and psr/http-message-implementation causes the problem. As soon as I removed these virtual packages from the "require" block, those two packages doesn't get updated all the time.

@kocsismate
Copy link
Contributor Author

kocsismate commented Mar 3, 2017

Sorry, there is another thing I noticed: in some of my other libs that I use (https://github.com/woohoolabs/harmony and https://github.com/woohoolabs/yin-middleware) I also require virtual packages and I suspect that the issue is related to that these virtual packages are required multiple times in my project.

@Seldaek
Copy link
Member

Seldaek commented Dec 19, 2017

Auto-closing this as it's marked as support request and has not received any update in a long time.

@Seldaek Seldaek closed this as completed Dec 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants