Come up with a way to allow core-recommended (and tarballs?) to install Guzzle 7 for PHP 8.1 compatibility and Laminas-feed 2.19 for PHP 8.2 compatibility

Created on 20 May 2022, about 2 years ago
Updated 14 July 2023, 11 months ago

Problem/Motivation

Follow-up for #3225966: Consider loosening our constraint to allow sites to install Guzzle 6 or 7, or otherwise handle PHP 8.1 deprecations for Guzzle 6 β†’

This issue did solve the problem for sites using the core-recommend template they will still use Guzzle 6 which is not compatible with PHP 8.1. Currently Guzzle 6 just give deprecation errors on PHP 8.1. Such deprecations are not user deprecations but they are language level deprecations. For example:

Return type of GuzzleHttp\Command\Command::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Proposed resolution

Possible solutions discussed in #3225966: Consider loosening our constraint to allow sites to install Guzzle 6 or 7, or otherwise handle PHP 8.1 deprecations for Guzzle 6 β†’

  1. @Berdir β†’ have a drupal/core-recommends-81 package
  2. @xjm β†’ However, making Guzzle a top-level dependency of core-recommended sounds even simpler and totally legit from an architecture perspective.
  3. @xjm β†’ Is there a way core-recommended could be conditional based on the platform PHP version?

Remaining tasks

API changes

Release notes snippet

πŸ“Œ Task
Status

Closed: won't fix

Version

9.5

Component
ComposerΒ  β†’

Last updated about 23 hours ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

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

    I am running 9.5.2. I would like to install the OpenAI-PHP/Client package https://packagist.org/packages/openai-php/client which requires Guzzle 7.5. My current Guzzle (in Drupal) version is 6.5.8.0.

    Does anyone know if there are any issues with installing Guzzle 7.50 at this point while still running Drupal 9.5.2 sites?

    Thanks!

  • πŸ‡¬πŸ‡§United Kingdom newaytech

    I am hoping to install the Shopify PHP library for a microservices project - but get an issue with Guzzle versions:

    - Root composer.json requires shopify/shopify-api ^4.2 -> satisfiable by shopify/shopify-api[v4.2.0].
    - shopify/shopify-api v4.2.0 requires guzzlehttp/guzzle ^7.0 -> found guzzlehttp/guzzle[dev-master, 7.0.0-beta.1, ..., 7.5.x-dev (alias of dev-master)] but the package is fixed to 6.5.8 (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.

    It would be great if we could get some guidance as to how to migrate safely toward Guzzle 7...

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

    It would be great if we could get some guidance as to how to migrate safely toward Guzzle 7

    https://www.drupal.org/node/3268032 β†’ links to https://www.drupal.org/docs/develop/using-composer/manage-dependencies#s... β†’ .

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

    In addition to Guzzle, core-recommended also currently pins Laminas-feed to 2.17 whose composer.json does not allow PHP 8.2, but 2.19 does, so people wanting to install Drupal 9.5 on PHP 8.2 need to switch away from core-recommended in order to get Laminas-feed 2.19 or higher. We can't raise the laminas-feed requirement in core-recommended, because 2.19 also removed support for PHP 7.4.

    Unlike the case with Guzzle 6/7, this prevents composer installation entirely with core-recommended 9.5 and PHP 8.2, which is a shame since in many cases the D9 site doesn't even need aggregator module enabled.

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

    For the laminas-feed issue, I opened πŸ“Œ Remove laminas-feed, laminas-escaper, and laminas-stdlib from drupal/core-recommended to allow Drupal 9.5 to be installed on PHP 8.2 Fixed . Not sure if that's a good solution, but perhaps it can spark other ideas?

  • Status changed to Closed: won't fix 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States xjm

    The remaining scope of this is no longer relevant since we're not going to be committing anything to D9 anymore (nor does D10 have Laminas dependencies). If we need core-recommended to do things that involve two-major constraints in the future, then we can open a new issue. Thanks!

Production build 0.69.0 2024