openai-php / laravel

⚡️ OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with OpenAI API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with v0.5.1 at composer require - http-interop/http-factory-guzzle

ohnotnow opened this issue · comments

Hi there,

I'm probably being dim, but I was going to try this out so just did a laravel new test-openai to create a fresh project, cd'd into it and ran the composer require openai-php/laravel and I get :

Using version ^0.5.1 for openai-php/laravel
./composer.json has been updated
Running composer update openai-php/laravel
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - http-interop/http-factory-guzzle 0.1.0 requires guzzlehttp/psr7 ^1.3.1 -> found guzzlehttp/psr7[1.3.1, ..., 1.9.1] but the package is fixed to 2.5.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - openai-php/laravel v0.5.1 requires http-interop/http-factory-guzzle ^0.1.0 -> satisfiable by http-interop/http-factory-guzzle[0.1.0].
    - Root composer.json requires openai-php/laravel ^0.5.1 -> satisfiable by openai-php/laravel[v0.5.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 openai-php/laravel:*" to figure out if any version is installable, or "composer require openai-php/laravel:^2.1" if you know which you need.

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

I tried dropping back to specifically v0.5.0 and that worked a-ok. Might just be me of course! PHP 8.2 and the Laravel project is at 10.12.0.

@ohnotnow Thank you for raising this issue. The dependency to http-interop/http-factory-guzzle was accidentally added with the last release. This has been fixed now (v.0.5.2)

Please give it another try and let me know if there is still an issue.

Resolved - installs a-ok now!