open-telemetry / opentelemetry-php

The OpenTelemetry PHP Library
https://opentelemetry.io/docs/instrumentation/php/
Apache License 2.0
751 stars 185 forks source link

Unable to install the package via composer #777

Closed ishanvyas22 closed 2 years ago

ishanvyas22 commented 2 years ago

Describe your environment

php -v
PHP 7.4.29 (cli) (built: Apr 14 2022 13:32:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.29, Copyright (c), by Zend Technologies

Steps to reproduce Below commands throws errrors:

composer require open-telemetry/sdk

or

composer require open-telemetry/opentelemetry

What is the expected behavior? Install the package!

What is the actual behavior?

Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^0.0.13 for open-telemetry/opentelemetry
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for open-telemetry/opentelemetry ^0.0.13 -> satisfiable by open-telemetry/opentelemetry[0.0.13].
    - open-telemetry/opentelemetry 0.0.13 requires php-http/async-client-implementation ^1.0 -> no matching package found.

Potential causes:
 - This package is not installable via Composer 1.x, see <https://blog.packagist.com/deprecating-composer-1-support/>
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

Additional context nothing

bobstrecansky commented 2 years ago

@ishanvyas22 - you'll need to include one of the satisfying virtual packages for php-http/async-client-implementation:

https://packagist.org/providers/php-http/async-client-implementation

Which one you choose will vary greatly depending on the implementation of whatever you're trying to implement. The guzzle7-adapter is a pretty popular choice if you're just looking for an implementation.

ishanvyas22 commented 2 years ago

Thanks.