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 "Ctools 3.x and 4.0.x are the same, and you can use whichever version works best up and down the dependency chain"https://www.drupal.org/project/ctools/releases/4.0.4, 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.

CommentFileSizeAuthor
#7 panelizer-n3410023-7.patch404 bytesdamienmckenna

Issue fork panelizer-3410023

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:

Comments

mvonfrie created an issue. See original summary.

mvonfrie’s picture

Status: Active » Needs review

candelas changed the visibility of the branch 3410023-php-8.2-compatibility to hidden.

candelas’s picture

Thanks @mvonfrie !
It works!

greenSkin changed the visibility of the branch 3410023-php-8.2-compatibility to active.

damienmckenna’s picture

Version: 8.x-4.5 » 8.x-4.x-dev
StatusFileSize
new404 bytes

How about this?

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thank you.

Status: Fixed » Closed (fixed)

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