nexus-repository-composer icon indicating copy to clipboard operation
nexus-repository-composer copied to clipboard

Virtual package support

Open AleksSem opened this issue 6 years ago • 13 comments

I`m trying ti install "geocoder-php/common-http": "4.0.0" through composer proxy.

I got an error:

Problem 1 - Installation request for geocoder-php/common-http 4.0.0 -> satisfiable by geocoder-php/common-http[4.0.0]. - geocoder-php/common-http 4.0.0 requires psr/http-message-implementation ^1.0 -> no matching package found.

After this error i`m trying to add "guzzlehttp/psr7" which implements Virutal package "psr/http-message-implementation" but error stays.

Everything works fine with original http://packagist.org

Can you please help to solve this issue or provide some fix for nexus composer?

Thank you.

AleksSem avatar Jun 01 '18 08:06 AleksSem

I'm not sure when I'll have time to look at this, but I can take a look as time permits. Two questions:

  1. Are you accessing Composer proxy through a group?
  2. Can you provide a (minimal) composer.json that displays this behavior so we can use it during our testing?

fjmilens3 avatar Jun 07 '18 14:06 fjmilens3

bump

jonasGossiaux avatar May 03 '19 12:05 jonasGossiaux

The package "nexmo/client": 1.8.1 returns the following error:

  Problem 1
    - nexmo/client 1.8.1 requires php-http/client-implementation ^1.0 -> no matching package found.
    - nexmo/client 1.8.0 requires php-http/client-implementation ^1.0 -> no matching package found.

tiaguinho avatar Sep 03 '19 11:09 tiaguinho

The package "nexmo/client": 1.8.1 returns the following error:

  Problem 1
    - nexmo/client 1.8.1 requires php-http/client-implementation ^1.0 -> no matching package found.
    - nexmo/client 1.8.0 requires php-http/client-implementation ^1.0 -> no matching package found.

I find ugly hack for this issue: You can add to your composer.json (that means your project provides implementation), but be careful because composer stops handle this dependency.

"provide": {
  "php-http/client-implementation": "^1.0"
},

AleksSem avatar Sep 03 '19 11:09 AleksSem

Works!

Thanks @AleksSem !

tiaguinho avatar Sep 05 '19 14:09 tiaguinho

This bug makes usage of this project completely impossible, it has critical priority

theravel avatar Mar 05 '20 15:03 theravel

I'm not sure when I'll have time to look at this, but I can take a look as time permits. Two questions:

  1. Are you accessing Composer proxy through a group?
  2. Can you provide a (minimal) composer.json that displays this behavior so we can use it during our testing?

@fjmilens3 this is an example:

{
    "require": {
        "sentry/sentry-symfony": "^3.4"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://artifacts.company.org/repository/composer-group"
        },
        {
            "packagist.org": false
        }
    ]
}

theravel avatar Mar 05 '20 16:03 theravel

hey @theravel just add this under the autoload-dev to get sentry working.

  "provide": {
        "php-http/client-implementation": "1.0",
        "php-http/async-client-implementation": "1.0",
        "psr/http-client-implementation": "1.0",
	"psr/http-message-implementation": "1.0"
      }, 

DKarakis avatar Mar 06 '20 16:03 DKarakis

It would be very nice if you will fix this bug. Please.

XilefNori avatar Apr 22 '20 17:04 XilefNori

It will be greatly appreciated to fix this please !

FloSew avatar Apr 29 '20 13:04 FloSew

I need to do more research but this seems to be some kind of composer bug actually. Nexus doesn't strip "provide" metadata from packages it hosts, but for some reason composer completely ignores it.

EDIT: Well nvm, composer has it implemented very weird but the issue is on the Nexus side of things.

eplightning avatar Apr 30 '20 10:04 eplightning

Do we have an update on this issue?

func0der avatar Dec 06 '20 00:12 func0der

Hi, we have a similar issue with our nexus : - payum/core 1.4.3 requires php-http/client-implementation ^1.0 -> no matching package found. Do you have an update for this issue. Thanks,

j3ouz4n avatar Jun 03 '21 12:06 j3ouz4n