Composer install conflicts

Created on 21 October 2024, 9 months ago

Problem 1
- laminas/laminas-servicemanager[3.21.0, ..., 3.21.x-dev] require php ~8.1.0 || ~8.2.0 -> your php version (8.3.12) does not satisfy that requirement.
- laminas/laminas-validator[2.31.0, ..., 2.38.x-dev] require php ~8.1.0 || ~8.2.0 -> your php version (8.3.12) does not satisfy that requirement.
- laminas/laminas-servicemanager[3.22.0, ..., 3.23.x-dev] require psr/container ^1.0 -> found psr/container[1.0.0, ..., 1.x-dev] but these were not loaded, likely because it conflicts with another require.
- laminas/laminas-validator[2.13.0, ..., 2.13.5] require php ^7.1 -> your php version (8.3.12) does not satisfy that requirement.
- laminas/laminas-validator[2.14.0, ..., 2.14.6] require php ^7.3 || ~8.0.0 -> your php version (8.3.12) does not satisfy that requirement.
- laminas/laminas-validator[2.15.0, ..., 2.19.0] require php ^7.3 || ~8.0.0 || ~8.1.0 -> your php version (8.3.12) does not satisfy that requirement.
- laminas/laminas-validator[2.20.0, ..., 2.25.0] require php ^7.4 || ~8.0.0 || ~8.1.0 -> your php version (8.3.12) does not satisfy that requirement.
- laminas/laminas-validator[2.26.0, ..., 2.30.x-dev] require php ~8.0.0 || ~8.1.0 || ~8.2.0 -> your php version (8.3.12) does not satisfy that requirement.
- mmucklo/email-parse[2.2.0, ..., 2.2.1] require laminas/laminas-validator ^2.13 -> satisfiable by laminas/laminas-validator[2.13.0, ..., 2.65.x-dev].
- drupal/webform_email_reply_threads[1.0.0-alpha1, ..., 1.0.x-dev] require mmucklo/email-parse ^2.2 -> satisfiable by mmucklo/email-parse[2.2.0, 2.2.1].
- laminas/laminas-validator[2.39.0, ..., 2.65.x-dev] require laminas/laminas-servicemanager ^3.21.0 -> satisfiable by laminas/laminas-servicemanager[3.21.0, ..., 3.23.x-dev].
- Root composer.json requires drupal/webform_email_reply_threads ^1 -> satisfiable by drupal/webform_email_reply_threads[1.0.0-alpha1, ..., 1.0.x-dev].

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

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

Comments & Activities

  • Issue created by @mortona2k
  • πŸ‡ΊπŸ‡ΈUnited States kerasai

    Hi there,

    I think there is a conflict with some of the dependencies, likely laminas/laminas-servicemanager or laminas/laminas-validator.

    Can you verify what your environment? Looks like PHP 8.3. What version of Drupal core, and any other notable modules/dependencies?

  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    PHP 8.3, Drupal 10.3.6.

    Looks like the required laminas package versions don't support PHP 8.3.

    mmucklo/email-parse 2.2 requires laminas/laminas-validator: ^2.13.
    https://root.packagist.org/packages/mmucklo/email-parse#2.2.1

    Looks like PHP support was added to laminals/laminas-validator in 2.39.
    https://root.packagist.org/packages/laminas/laminas-validator#2.39.0

    2.39 requires laminas-servicemanager 3.21.0, but that does not yet support php 8.3.

    So the blocker is mmucklo/email-parse because it's pinned to an outdated release. The laminas packages look like they are fixed, but are not allowed to update.

  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    Some further analysis.

    laminas-validator 2.39 requires servicemanager ^3.21.0, but that allows updating to 3.22.0, which supports php 8.3.

    servicemanager 3.22.0 - 3.23.x require psr/container:^1, which has these conflicts in my project:

    drupal/core-recommended 10.3.6 requires psr/container (~2.0.2)
    illuminate/contracts v10.48.22 requires psr/container (^1.1.1|^2.0.1)
    league/container 4.2.2 requires psr/container (^1.1 || ^2.0)
    pimple/pimple v3.5.0 requires psr/container (^1.1 || ^2.0)
    symfony/dependency-injection v6.4.12 requires psr/container (^1.1|^2.0)
    symfony/service-contracts v3.5.0 requires psr/container (^1.1|^2.0)
    symfony/type-info v7.1.5 requires psr/container (^1.1|^2.0)

    (Core being the big blocker there).

    servicemanager 4.x adds support for ^1.1 || ^2.0.

    So the problem is still the dependency chain on mmucklo/email-parse.

  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    Created a new issue to request bumping laminas-validator dependency in email-parse to ^3.

    3.0 was released yesterday: https://github.com/laminas/laminas-validator/releases/tag/3.0.0

    https://github.com/mmucklo/email-parse/issues/33

    They will need to create a new version to split the dependency requirements.

    I'm not familiar with email-parse. Maybe there's a better package out there, or you could try bumping the version manually to test if it still works.

    Looks like there are a few breaking changes to review.
    https://github.com/laminas/laminas-servicemanager/releases/tag/4.0.0
    https://github.com/laminas/laminas-validator/releases/tag/3.0.0

  • Status changed to Needs review 9 days ago
  • πŸ‡ΊπŸ‡ΈUnited States oadaeh

    I've run into this upgrading from PHP 8.1.x to PHP 8.2.x.

    Rather than wait longer for something that might never happen (creating a tagged release on mmucklo/email-parse), I'm trying patching the composer.json file for this module to require the master branch of mmucklo/email-parse.

    Unfortunately, I cannot verify if that even works, because Composer only looks at the composer.lock file, and not the patched module.

    So, I'm providing a patch here to see if it can be included to test it, even if it's included in a way that doesn't affect the main branch, but still allows Composer to pull it without needing to use cweagans/composer-patches.

  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    To test installing a module with a patched composer.json or info file, clone the issue branch somewhere, like modules/pinnned, then set up a path repository that points to it in your main project's composer.json.

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

    Okay, once I figured out the correct configuration to use with Lando, I was able to verify the patch worked:

    % lando composer require "jason/webform_email_reply_threads:@dev"
    ./composer.json has been updated
    Running composer update jason/webform_email_reply_threads
    Gathering patches for root package.
    Loading composer repositories with package information
    Updating dependencies                                 
    Lock file operations: 6 installs, 0 updates, 0 removals
      - Locking brick/varexporter (0.5.0)
      - Locking jason/webform_email_reply_threads (dev-develop)
      - Locking laminas/laminas-servicemanager (4.4.0)
      - Locking laminas/laminas-translator (1.1.0)
      - Locking laminas/laminas-validator (3.4.2)
      - Locking mmucklo/email-parse (dev-master 47e6918)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 6 installs, 0 updates, 0 removals
      - Downloading laminas/laminas-translator (1.1.0)
      - Downloading brick/varexporter (0.5.0)
      - Downloading laminas/laminas-servicemanager (4.4.0)
      - Downloading laminas/laminas-validator (3.4.2)
      - Downloading mmucklo/email-parse (dev-master 47e6918)
    Gathering patches for root package.
    Gathering patches for dependencies. This might take a minute.
      - Installing laminas/laminas-translator (1.1.0): Extracting archive
      - Installing brick/varexporter (0.5.0): Extracting archive
      - Installing laminas/laminas-servicemanager (4.4.0): Extracting archive
      - Installing laminas/laminas-validator (3.4.2): Extracting archive
      - Installing mmucklo/email-parse (dev-master 47e6918): Extracting archive
      - Installing jason/webform_email_reply_threads (dev-develop): Symlinking from docroot/modules/pinned/webform_email_reply_threads
    

    In addition to the patch, I changed the name of the package locally from "drupal/webform_email_reply_threads" to "jason/webform_email_reply_threads", to make sure I was getting the results I expected.

Production build 0.71.5 2024