Vonage / vonage-php-sdk-video

Vonage Video SDK for PHP
Apache License 2.0
0 stars 2 forks source link

Unable to Install vonage/video Package via Composer #5

Closed shawndl closed 8 months ago

shawndl commented 8 months ago

Description: When attempting to install the vonage/video package using Composer into an empty project, the following error occurred:

./composer.json has been updated
Running composer update vonage/video
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - vonage/video[1.0.0, ..., 1.0.1] require vonage/client-core ^4.0 -> satisfiable by vonage/client-core[4.0.0, ..., 4.6.0].
    - vonage/client-core[4.0.0, ..., 4.6.0] require psr/http-client-implementation ^1.0 -> could not be found in any version, but the following packages provide it:
      - guzzlehttp/guzzle Guzzle is a PHP HTTP client library
      - symfony/http-client Provides powerful methods to fetch HTTP resources synchronously or asynchronously
      - ... (list of available packages)
      - ... (additional context)

Potential causes:
 - 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

Steps to Reproduce:

Create a new empty project. Use Composer to install the vonage/video package. Expected Behavior: The package vonage/video should be successfully installed without dependency conflicts.

Additional Information:

Composer version: 2.5.8 PHP version: 8.2.9

SecondeJK commented 8 months ago

I think I'm going to need more info here, can you run composer require vonage/video -vvv and output the logs?

I've successfully installed the video package with the core using PHP8.2.9 with composer 2.55 and 2.6.6 in a totally empty project so potentially it's a path binary or something blocking it.

shawndl commented 8 months ago

Running 2.6.6 (2023-12-08 18:32:26) with PHP 8.2.9 on Darwin / 22.1.0 Reading ./composer.json (/Users/shawnlegge/playground/test/composer.json) Loading config file /Users/shawnlegge/.composer/config.json Loading config file /Users/shawnlegge/.composer/auth.json Loading config file ./composer.json (/Users/shawnlegge/playground/test/composer.json) Checked CA file /opt/homebrew/etc/ca-certificates/cert.pem: valid Executing command (/Users/shawnlegge/playground/test): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v' Executing command (/Users/shawnlegge/playground/test): git describe --exact-match --tags Executing command (CWD): git --version Executing command (/Users/shawnlegge/playground/test): git log --pretty="%H" -n1 HEAD --no-show-signature Executing command (/Users/shawnlegge/playground/test): hg branch Executing command (/Users/shawnlegge/playground/test): fossil branch list Executing command (/Users/shawnlegge/playground/test): fossil tag list Executing command (/Users/shawnlegge/playground/test): svn info --xml Failed to initialize global composer: Composer could not find the config file: /Users/shawnlegge/.composer/composer.json

Reading ./composer.lock (/Users/shawnlegge/playground/test/composer.lock) Reading /Users/shawnlegge/playground/test/vendor/composer/installed.json Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/packages.json from cache Downloading https://repo.packagist.org/packages.json if modified [200] https://repo.packagist.org/packages.json Writing /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/packages.json into cache Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/provider-vonage~video.json from cache Downloading https://repo.packagist.org/p2/vonage/video.json if modified [304] https://repo.packagist.org/p2/vonage/video.json Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/provider-vonage~video.json from cache Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/provider-vonage~video~dev.json from cache Downloading https://repo.packagist.org/p2/vonage/video~dev.json if modified [304] https://repo.packagist.org/p2/vonage/video~dev.json ./composer.json has been updated Reading ./composer.json (/Users/shawnlegge/playground/test/composer.json) Loading config file /Users/shawnlegge/.composer/config.json Loading config file /Users/shawnlegge/.composer/auth.json Loading config file ./composer.json (/Users/shawnlegge/playground/test/composer.json) Executing command (/Users/shawnlegge/playground/test): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v' Executing command (/Users/shawnlegge/playground/test): git describe --exact-match --tags Executing command (/Users/shawnlegge/playground/test): git log --pretty="%H" -n1 HEAD --no-show-signature Executing command (/Users/shawnlegge/playground/test): hg branch Executing command (/Users/shawnlegge/playground/test): fossil branch list Executing command (/Users/shawnlegge/playground/test): fossil tag list Executing command (/Users/shawnlegge/playground/test): svn info --xml Failed to initialize global composer: Composer could not find the config file: /Users/shawnlegge/.composer/composer.json

Reading ./composer.lock (/Users/shawnlegge/playground/test/composer.lock) Reading /Users/shawnlegge/playground/test/vendor/composer/installed.json Running composer update vonage/video Loading composer repositories with package information Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/packages.json from cache Downloading https://repo.packagist.org/packages.json if modified [304] https://repo.packagist.org/packages.json Downloading https://repo.packagist.org/p2/php-http/client-implementation.json Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/provider-vonage~video.json from cache Downloading https://repo.packagist.org/p2/vonage/video.json if modified [404] https://repo.packagist.org/p2/php-http/client-implementation.json [304] https://repo.packagist.org/p2/vonage/video.json Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/provider-vonage~jwt.json from cache Downloading https://repo.packagist.org/p2/vonage/jwt.json if modified [304] https://repo.packagist.org/p2/vonage/jwt.json Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/provider-ramsey~uuid.json from cache Downloading https://repo.packagist.org/p2/ramsey/uuid.json if modified [304] https://repo.packagist.org/p2/ramsey/uuid.json Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/provider-paragonie~random_compat.json from cache Downloading https://repo.packagist.org/p2/paragonie/random_compat.json if modified Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/provider-symfony~polyfill-ctype.json from cache Downloading https://repo.packagist.org/p2/symfony/polyfill-ctype.json if modified [304] https://repo.packagist.org/p2/paragonie/random_compat.json [304] https://repo.packagist.org/p2/symfony/polyfill-ctype.json Built pool. Running pool optimizer. Pool optimizer completed in 0.004 seconds Found 203 package versions referenced in your dependency graph. 72 (35%) were optimized away. Updating dependencies Generating rules Resolving dependencies through SAT

Dependency resolution completed in 0.001 seconds Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/provider-vonage~client-core.json from cache Downloading https://repo.packagist.org/p2/vonage/client-core.json if modified [304] https://repo.packagist.org/p2/vonage/client-core.json Reading /Users/shawnlegge/Library/Caches/composer/repo/https---repo.packagist.org/provider-vonage~client-core.json from cache Your requirements could not be resolved to an installable set of packages.

Problem 1

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require vonage/video:*" to figure out if any version is installable, or "composer require vonage/video:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

SecondeJK commented 8 months ago

Hmm, I think this might be a limitation currently as I'm working on restructuring the dependencies. Try installing vonage/client, which should satisfy the requirement to need a PSR compliant HTTP client.

SecondeJK commented 8 months ago

OK, I'm going to adjust the docs for a more clear path of instructions. For now, there are two options:

  1. in a new composer project, install vonage/client first and then install vonage/video. This will take care of installing guzzle for you
  2. to solve the original problem, install a PSR-11 compliant Client. Guzzle is recommended, but if you want to use a different one like Symfony's then go for it.

There is a bit of dependency hell with this that I will be gradually working to unpick into a more robust separation of concerns. Give me a shout if this works, or you get problems still

shawndl commented 8 months ago

Thanks it seems to be working now. I'll close the ticket