Problem/Motivation

Composer reports that "drupal/term_merge 2.0.0-beta2 requires php ^7.4 -> your php version (8.1.3) does not satisfy that requirement."

Steps to reproduce

I had the drupal/term_merge ^2.0.0-beta1 installed before upgrading the server php from 7.4 to 8.1.

Run:

composer update drupal/term_merge:2.0.0-beta2 -W

Result:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/term_merge ^2.0@beta, 2.0.0-beta2 -> satisfiable by drupal/term_merge[2.0.0-beta2].
    - drupal/term_merge 2.0.0-beta2 requires php ^7.4 -> your php version (8.1.3) does not satisfy that requirement.

Issue fork term_merge-3275374

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GrahamShepherd created an issue. See original summary.

GrahamShepherd’s picture

Title: Make module compatible with php 8 » Beta2 version is not compatible with php 8.1
GrahamShepherd’s picture

I have tried the installation on another site on which term_merge was not previously installed.

PHP version 8.1.4

composer require 'drupal/term_merge:^2.0.0-beta2'

Results in:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/term_merge ^2.0.0-beta2 -> satisfiable by drupal/term_merge[2.0.0-beta2, 2.0.x-dev].
    - drupal/term_merge[2.0.0-beta2, ..., 2.0.x-dev] require php ^7.4 -> your php version (8.1.4) does not satisfy that requirement.


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

I have changed the title accordingly, to reflect that it is the beta2 version which introduces the php 8.1 incompatibility.

GrahamShepherd’s picture

I suspect that the problem is caused by the addition of a composer.json file in the beta2 version which includes:

        "require": {
        "php": "^7.4",
        "drupal/core": "^9",
        "drupal/term_reference_change": "*"
        }

This should be changed to:

        "require": {
        "php": "^7.4 || ^8.0",
        "drupal/core": "^9",
        "drupal/term_reference_change": "*"
        }
idiaz.roncero’s picture

I can confirm this issue, and is troublesome even if you apply a patch because Composer will complain (and fail) before trying to apply the fix. This needs to be commited to the repo directly.

idiaz.roncero’s picture

Submitted MR to quick fix this.

idiaz.roncero’s picture

Status: Active » Needs review
MauHG’s picture

Tested the patch as a forked dependency and is working with PHP 8

MauHG’s picture

Status: Needs review » Reviewed & tested by the community
Renrhaf’s picture

+1 RTBC

daniel_j’s picture

Version: 2.0.0-beta2 » 2.0.0-beta4
Status: Reviewed & tested by the community » Fixed

Fixed in beta4.

GrahamShepherd’s picture

Many thanks. Works fine.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.