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

Can't install using composer 2 #248

Closed
garak opened this issue Nov 5, 2020 · 4 comments
Closed

Can't install using composer 2 #248

garak opened this issue Nov 5, 2020 · 4 comments

Comments

@garak
Copy link

garak commented Nov 5, 2020

I know that this is probably composer's fault, but I'd like to try anyway here.
In my current situation, I'm using ergebnis/composer-normalize 2.10.0 and ergebnis/json-printer 3.1.1

I would update vendors, but a "composer update" results in:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - ergebnis/composer-normalize[2.10.0, ..., 2.11.0] require ergebnis/json-printer ^3.1.1 -> found ergebnis/json-printer[dev-main] but it does not match the constraint.
    - Root composer.json requires ergebnis/composer-normalize ^2.10 -> satisfiable by ergebnis/composer-normalize[2.10.0, 2.11.0].

It's like composer can't find correct versions for this library, looking for "dev-main"

I event did a differen try, creating an empty dir and executing "composer init --no-interaction && composer require ergebnis/json-printer".
This is working with composer 1, not working with composer 2 with following error:

[InvalidArgumentException]                                                                                                                                                         
  Could not find a version of package ergebnis/json-printer matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability
@jonaseberle
Copy link

jonaseberle commented Nov 9, 2020

It seems like composer 2 does not find all available versions of this package

$ composer req ergebnis/composer-normalize
Using version ^2.11 for ergebnis/composer-normalize
./composer.json has been updated
Running composer update ergebnis/composer-normalize
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires ergebnis/composer-normalize ^2.11 -> satisfiable by ergebnis/composer-normalize[2.11.0].
    - ergebnis/composer-normalize 2.11.0 requires ergebnis/json-printer ^3.1.1 -> found ergebnis/json-printer[dev-dependabot/composer/phpstan/phpstan-0.12.54, dev-main] but it does not match the constraint.
$ composer req --dev ergebnis/json-printer:3.1.1                                                                         
  [InvalidArgumentException]                                                
  Could not find package ergebnis/json-printer in a version matching 3.1.1  

composer v1

$ composer show -a ergebnis/json-printer
...
versions : 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.0.1, 2.0.0, 1.1.0, 1.0.0, dev-main, dev-dependabot/composer/phpstan/phpstan-0.12.54

composer v2

$ composer show -a ergebnis/json-printer
...
versions : 9999999-dev, dev-main, dev-dependabot/composer/phpstan/phpstan-0.12.54

and just an instant later:

$ composer show -a ergebnis/json-printer
...
versions : 9999999-dev, * 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.0.1, 2.0.0, 1.1.0, 1.0.0, dev-main, dev-dependabot/composer/phpstan/phpstan-0.12.54

I had this changing back and forth today. I did composer clear quite often. I wonder what is going on.

@garak
Copy link
Author

garak commented Nov 9, 2020

Should we file an issue on composer repo?

@garak
Copy link
Author

garak commented Nov 15, 2020

See composer/composer#9481

@garak
Copy link
Author

garak commented Nov 17, 2020

Solved in composer

@garak garak closed this as completed Nov 17, 2020
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

2 participants