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 detected version incorrectly #6859

Closed
peter279k opened this Issue Nov 30, 2017 · 24 comments

Comments

Projects
None yet
@peter279k
Copy link

peter279k commented Nov 30, 2017

  • Composer version: 1.5.3
  • Composer command: composer require satooshi/php-coveralls dev-master
  • Composer error output:
[InvalidArgumentException]                                                   
  Could not find package satooshi/php-coveralls in a version matching dev-master

As title, the version seems to be incorrect during finding the current version.
But using the Composer version 1.5.2 is successful.
I think it's the bug.

@OndraM

This comment has been minimized.

Copy link

OndraM commented Nov 30, 2017

Just hit the same issue:

$ composer --version
Composer version 1.5.2 2017-09-11 16:59:25
$ mkdir test && cd test
$ composer require lmc/steward:dev-master
... Installing lmc/steward (dev-master 3b2f7ee): Cloning 3b2f7ee693 from cache
...
Writing lock file
Generating autoload files
$ composer --version
Composer version 1.5.3 2017-11-30 18:29:43
$ mkdir test-2 && cd test-2
$ composer require lmc/steward:dev-master

                                                                       
  [InvalidArgumentException]                                           
  Could not find package lmc/steward in a version matching dev-master  
                                                                       

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

@Seldaek Seldaek added the Bug label Dec 1, 2017

@Seldaek Seldaek added this to the 1.5 milestone Dec 1, 2017

@Seldaek Seldaek closed this in a928ffa Dec 1, 2017

@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Dec 1, 2017

1.5.4 is out correcting this.

@thewilkybarkid

This comment has been minimized.

Copy link
Contributor

thewilkybarkid commented Dec 1, 2017

#6860 still fails for me...

@peter279k

This comment has been minimized.

Copy link
Author

peter279k commented Dec 1, 2017

It seems to be failed for me, too....

@mente

This comment has been minimized.

Copy link

mente commented Dec 1, 2017

Still not working here :-/

@jakzal

This comment has been minimized.

Copy link
Contributor

jakzal commented Dec 1, 2017

What I'm getting now is:

Package rskuipers/php-assumptions at version dev-master has a PHP requirement incompatible with your PHP version (7.2.0.0)

But rskuipers/php-assumptions package doesn't have a PHP version requirement.

@s7eph4n

This comment has been minimized.

Copy link

s7eph4n commented Dec 1, 2017

Not working here, either:

$ composer --version
Composer version 1.5.4 2017-12-01 11:02:17

$ composer require 'mediawiki/semantic-media-wiki=~3.0@dev' --update-with-dependencies

  [InvalidArgumentException]                                                   
  Package mediawiki/semantic-media-wiki at version ~3.0@dev has a PHP require  
  ment incompatible with your PHP version (5.6.31.0)                           

PHP requirement is "php": ">=5.5.0".

See https://travis-ci.org/SemanticMediaWiki/SemanticResultFormats/jobs/309733763

@Seldaek Seldaek reopened this Dec 1, 2017

@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Dec 1, 2017

Sorry folks, I thought I got to the bottom of it but I guess not. I'll have another look.

@Seldaek Seldaek closed this in 3976d9f Dec 1, 2017

@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Dec 1, 2017

Can you please try after composer self-update --snapshot to make sure it's fine for everyone before I tag another one this time? :)

@OndraM

This comment has been minimized.

Copy link

OndraM commented Dec 1, 2017

Great, works for me now, thanks for the quick fix!

@xabbuh

This comment has been minimized.

Copy link
Contributor

xabbuh commented Dec 1, 2017

👍 fixes it for me

@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Dec 1, 2017

Alright I'll get another release out then.

@peter279k

This comment has been minimized.

Copy link
Author

peter279k commented Dec 1, 2017

It looks good for me when using the version 1.5.5.
Thanks for @Seldaek

@jakzal

This comment has been minimized.

Copy link
Contributor

jakzal commented Dec 1, 2017

Ok, this works:

composer global req --no-suggest --prefer-dist --update-no-dev -n bmitch/churn-php
composer global req --no-suggest --prefer-dist --update-no-dev -n akeneo/php-coupling-detector
composer global req --no-suggest --prefer-dist --update-no-dev -n rskuipers/php-assumptions:dev-master

But this still doesn't (on php 7.2):

composer global req --no-suggest --prefer-dist --update-no-dev -n bmitch/churn-php akeneo/php-coupling-detector rskuipers/php-assumptions:dev-master
@peter279k

This comment has been minimized.

Copy link
Author

peter279k commented Dec 3, 2017

To @jakzal, I also try your command and get the same error output here.
And here is the error output:

Using version ^0.4.1 for bmitch/churn-php
Using version ^0.2.0 for akeneo/php-coupling-detector

                                                                               
  [InvalidArgumentException]                                                   
  Package rskuipers/php-assumptions at version dev-master has a PHP requireme  
  nt incompatible with your PHP version (7.2.0.0)                              
                         

And I found that the rskuipers/php-assumptions composer.json doesn't present the specific PHP version in require settings.

Perhaps this is the problem and let the Composer detect version incorrectly.
I think we can try to add the specific PHP version in that composer.json then try to execute command again.

Thanks.

@peter279k

This comment has been minimized.

Copy link
Author

peter279k commented Dec 3, 2017

BTW, it worked fine when using Composer version 1.5.2 in PHP 7.2
It seems that the Composer has the bug problem.

@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Dec 4, 2017

Please don't modify that package at all, as it will break the reproducibility of the bug here. I'll have a look when I get a chance.

@Seldaek Seldaek reopened this Dec 4, 2017

@tomasnorre

This comment has been minimized.

Copy link

tomasnorre commented Dec 4, 2017

I have seen a fun behavior here.

When have reposity
{ "type": "composer", "url": "https://composer.domain.tld" }
It doesn't work,

but with (satis):
{ "type": "git", "url": "git@domain.tld:repository" }
Then it works, I don't know if it has a relation to satis in combination with composer and satis.

svensp added a commit to ipunkt/docker-backup-restore that referenced this issue Dec 7, 2017

jakzal added a commit to jakzal/phpqa that referenced this issue Dec 15, 2017

@Seldaek Seldaek closed this in 00f6c0a Dec 18, 2017

@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Dec 18, 2017

Ok I think (or hope) we're finally through with all issues here :)

@jakzal

This comment has been minimized.

Copy link
Contributor

jakzal commented Dec 18, 2017

Seems to work now. Thanks @Seldaek 🍺

@rxu

This comment has been minimized.

Copy link

rxu commented Dec 23, 2017

Still fails with 1.5.6 here https://travis-ci.org/phpbb-extensions/ad-management/jobs/320703184#L609

[InvalidArgumentException]
Package phpbb/epv at version dev-master has a PHP requirement incompatible
with your PHP version (5.4)

Rolling back to 1.5.2 fixes the issue:
https://github.com/phpbb-extensions/ad-management/pull/105/files

@Seldaek

Seldaek added a commit that referenced this issue Jan 3, 2018

@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Jan 3, 2018

@rxu Thanks, this is fixed by 8a50345 - not yet in a release but will be included in 1.6.0

@rxu

This comment has been minimized.

Copy link

rxu commented Jan 3, 2018

@Seldaek Thanks. Looking forward for release to check the fix.

@mehdichaouch

This comment has been minimized.

Copy link

mehdichaouch commented Jan 3, 2018

Me too ;)

@rxu rxu referenced this issue Jan 5, 2018

Merged

[ticket/15369] Update composer #4966

4 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.