php 8.1 - lullabot/amp seems abandoned: replace abandoned querypath/querypath with gravitypdf/querypath

Created on 8 December 2022, over 1 year ago
Updated 8 December 2023, 7 months ago

The current amp module does not have support for php 8.1 support due to lullabot/amp dependency querypath/querypath which is outdated, on top of that it is currently clashing with the feeds_ex module ( see https://www.drupal.org/project/feeds_ex/issues/3299193 🐛 Module Conflict with AMP using deprecated querypath library Active )

gravitypdf/querypath has been published on packagist which will bring php 8.1 support onto various modules using querypath as a dependency, see the discussion here: https://github.com/arthurkushman/querypath/pull/12

As an interim solution I have published deimosindustries/lullabot-amp which replaces the outdated lullabot/amp dependency on this project but ideally this project should have the gravitypdf/querypath dependency as it'll replaces automatically the outdated lullabot querypath.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom luigimannoni

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇪🇸Spain jansete

    Hello luigimannoni,

    Do you know if we change manually the library, will it works without more changes?

    To know until the maintainers fix them.

  • 🇪🇸Spain jansete

    My temporary solution:

    Override lullabot/amp repository in composer.json using luigimannoni fork:

    "lullabot/amp": {
                "type": "package",
                "package": {
                    "name": "lullabot/amp",
                    "version": "2.0.4",
                    "source": {
                        "type": "git",
                        "url": "https://github.com/deimosindustries/amp-library.git",
                        "reference": "6a3074586ead73cd47cb4fc4e2c429df19fcc2b6"
                    }
                }
            }
  • 🇪🇸Spain jansete

    I have found a simplier solution.

    Only do this:
    composer require gravitypdf/querypath

    The replace property of gravitypdf composer.json, delete deprecated library and use the new one.

  • 🇬🇧United Kingdom luigimannoni

    Hi Jansete,
    half a year has passed and I almost forgot about this issue.

    Think just requiring `gravitypdf/querypath` if you have only the amp module it's enough as you posted, I created that package because a require of the overridden querypath package wasn't enough if you have multiple modules requiring different forks/versions of querypath and resulted in a dependency lock on Composer 2.

  • 🇸🇮Slovenia joco_sp

    Running composer require gravitypdf/querypath did the trick. Thank you @jansete :)

Production build 0.69.0 2024