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 )

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.

Comments

luigimannoni created an issue. See original summary.

luigimannoni’s picture

Priority: Major » Critical
jansete’s picture

Hello luigimannoni,

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

To know until the maintainers fix them.

jansete’s picture

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"
                }
            }
        }
jansete’s picture

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.

It isn't necessary do a fork of anything.

But it's possible that you have to restart your php and apache services becasue internal file cache.

luigimannoni’s picture

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 unresolvable dependency conflict on Composer 2.

joco_sp’s picture

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