PHP 8.2 compatibility: update ctools version constraint

Created on 20 December 2023, about 1 year ago
Updated 10 February 2024, 11 months ago

Problem/Motivation

Ctools 3.x and 4.0.x are the same code β†’ , while 3.x "resolves legacy dependencies" and dependent modules should use 4.x. While 4.x is compatible with PHP 8.2, 3.x is not. So upgrading the PHP version to 8.2 currently is not possible for sites using Panelizer.

Steps to reproduce

Install Ctools 3.14 and Panelizer 4.5 into a Drupal 9.5 codebase via composer and then try to update Ctools to 4.0.x. You will get the following error:

  Problem 1
    - Root composer.json requires drupal/panelizer ^4.5 -> satisfiable by drupal/panelizer[4.5.0, 4.x-dev].
    - drupal/panelizer[4.5.0, ..., 4.x-dev] require drupal/ctools ^3.1 || dev-3.x -> found drupal/ctools[dev-3.x, 3.1.0, ..., 3.x-dev (alias of dev-3.x)] but it conflicts with your root composer.json require (^4.0).

Proposed resolution

As , just update the version constraint to allow Ctools 4.0.x as well.

- "drupal/ctools": "^3.1 || dev-3.x",
+ "drupal/ctools": "^3.1 || dev-3.x || ^4.0 || 4.0.x-dev",

Eventually this can even be broadend to

- "drupal/ctools": "^3.1 || dev-3.x",
+ "drupal/ctools": "^3.1 || dev-3.x || ^4.0 || 4.x-dev",

but I don't know if the cite above will stay true for Ctool 4.1.x as well.

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria mvonfrie

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024