Incompatibility with Drupal 10 due to "symfony/css-selector" and missing "drupal/core" version constraints

Created on 12 September 2023, over 1 year ago
Updated 19 September 2023, over 1 year ago

Description

I've been trying to use the "Flexible Table Of Contents" module with Drupal 10 and encountered a compatibility issue. The module's composer.json specifies a dependency on "symfony/css-selector": "^3.4.0 || ^4", which might be incompatible with Drupal 10. Additionally, there's no specified compatibility with Drupal 10 in the composer.json.

Error Message

Problem 1
  - Root composer.json requires drupal/table_of_contents ^2.0 -> satisfiable by drupal/table_of_contents[2.0.0, 2.0.1, 2.x-dev].
  - drupal/table_of_contents[2.0.0, ..., 2.x-dev] require drupal/core ^8 || ^9 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev] but the package is fixed to 10.1.3 (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.

Steps to Reproduce

  1. Install Drupal 10.1.3.
  2. Try to install the "Flexible Table Of Contents" module using composer.
  3. Observe the error related to "symfony/css-selector" and "drupal/core" version incompatibility.

Expected Result

The module should be compatible with Drupal 10 and should not have any dependency conflicts.

Actual Result

Composer throws an error due to the incompatible versions of "symfony/css-selector" and the absence of a "drupal/core" constraint for Drupal 10.

Suggested Fix

  1. Update the composer.json file of the module to include versions ^5 and ^6 for "symfony/css-selector".
  2. Add a constraint for "drupal/core": "^10" in the require section to indicate compatibility with Drupal 10.
πŸ› Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States yorchperaza Denver

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

Comments & Activities

  • Issue created by @yorchperaza
  • @yorchperaza opened merge request.
  • πŸ‡ΊπŸ‡ΈUnited States yorchperaza Denver

    Hello maintainers and community,

    I've identified an incompatibility issue with the "Flexible Table Of Contents" module when used with Drupal 10. The root cause seems to be the version constraints specified in the composer.json for the symfony/css-selector dependency and the absence of a drupal/core constraint for Drupal 10.

    To address this, I've created a patch that:

    Updates the symfony/css-selector version constraints to include ^5 and ^6.
    Adds a constraint for drupal/core to indicate compatibility with Drupal 10.
    I've attached the patch to this comment. I would appreciate it if the maintainers or other community members could review and test the patch to ensure it resolves the issue and doesn't introduce any new ones.

    Thank you for your time and consideration. Looking forward to your feedback!

  • @yorchperaza opened merge request.
  • Status changed to Closed: duplicate over 1 year ago
  • e0ipso Can Picafort

    This is a duplicate of πŸ“Œ Automated Drupal 10 compatibility fixes RTBC . Please, collaborate in that MR instead.

    Thanks, and apologies for the inconveniences.

Production build 0.71.5 2024