Bump openai-php client dependency to ^0.7.4+

Created on 3 November 2023, over 1 year ago
Updated 24 November 2023, over 1 year ago

There are new releases for the openai-php client library, I am unable to install 1.0.0 with the OpenAI module since the latter requires a much higher version.

https://github.com/openai-php/client/tags

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kevinquillen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @kevinquillen
  • Status changed to Postponed: needs info over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

    I don't see why that would be necessary. The currently required version is ^0.3.5, that means that you should be able to install versions above ^0.7.4. Have you tried adding -W to the composer require or update command?

  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    Doesn't work.

      - Downgrading openai-php/client (v0.7.4 => v0.3.5): Extracting archive
      - Upgrading drupal/ignition (1.0.0-alpha2 => 1.0.0): Extracting archive
    

    Subsequently:

    Package operations: 1 install, 0 updates, 0 removals
      - Downloading drupal/openai (1.0.0-alpha9)
      - Installing drupal/openai (1.0.0-alpha9): Extracting archive
    

    This is because versions prior to .4 have bugs, and there were compatibility issues with .4 in 10.0.0 vs .5 in 10.1.x of Drupal core, hence the range:

    "openai-php/client": "^0.4|^v0.7.4"

    in the OpenAI module.

    If I specify:

     "require": {
        "openai-php/client": "~1.0.0"
     }
    

    in the OpenAI module, Ignition 1.0.0 installs but with version 0.3.5 of the client.

    Ultimately:

    drupal/ignition 1.0.0 requires openai-php/client ^0.3.5 -> found openai-php/client[v0.3.5] but it conflicts with your root composer.json require (~1.0).

    I cannot get Composer to install both the OpenAI module and Ignition and vice versa at their current requirement level.

  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    Installing on a different site that does not have the OpenAI module also does not get the latest release:

    Installing openai-php/client (v0.3.5)

  • Status changed to Needs review over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels
  • Status changed to RTBC over 1 year ago
  • πŸ‡―πŸ‡΅Japan tyler36 Osaka

    MR9 allowed a newer version of openai-php/client, specifically v0.7.10

    Current Drupal 10.1.x-dev 59b4475 also requires a new version.

    $ composer why openai-php/client
    drupal/recommended-project dev-main  requires openai-php/client (^0.7.10)      
    drupal/ignition            1.0.x-dev requires openai-php/client (^0.4|^v0.7.4) 
    
  • πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

    Drupal core doesn't require openai-php/client, must be because of a contrib module you required. Tested by creating a new project using composer create-project drupal/recommended-project my-project, running composer why openai-php/client after displays the following error:

    [InvalidArgumentException]
    Could not find package "openai-php/client" in your project

  • Status changed to Fixed over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024