Drupal 10 compatibility

Created on 27 January 2023, over 1 year ago
Updated 19 April 2023, about 1 year ago

Problem/Motivation

Drupal 10 is out, we need a release compatible with it.

Steps to reproduce

Current blocker

From #4:

D10 requires the psr/log 3.0.0 whereas the akamai module requires the patriziotomato/edgegrid-client v1.2.1 which then requires psr/log ^1.0. Conflict cannot be resolved. Plus patriziotomato/edgegrid-client has been archived and replaced by https://github.com/akamai/AkamaiOPEN-edgegrid-php-client which also requires psr/log ^1.0.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jrglasgow Idaho

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

Comments & Activities

  • Issue created by @jrglasgow
  • @jrglasgow opened merge request.
  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States jrglasgow Idaho

    I have started work on this update, as far as I have seen so far the only need is to update info file and composer.json... in the next weeks I will be testing and will update if needed.

  • Status changed to Needs work over 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia rli Canberra

    D10 requires the psr/log 3.0.0 whereas the akamai module requires the patriziotomato/edgegrid-client v1.2.1 which then requires psr/log ^1.0. Conflict cannot be resolved. Plus patriziotomato/edgegrid-client has been archived and replaced by https://github.com/akamai/AkamaiOPEN-edgegrid-php-client.

  • First commit to issue fork.
  • πŸ‡¬πŸ‡§United Kingdom T-lo Bristol, UK

    @rli points out the psr/log composer incompatibility which might make this quite a large re-write.

    We're dependant on patriziotomato/edgegrid-client v1.2.1 which has been archived as the original Akamai repo akamai-open/edgegrid-client is active again.

    patriziotomato/edgegrid-client forked from the Akamai repo akamai-open/edgegrid-client in 2017 and the version we depend on is three releases past the fork point (1.0.0).

    There's a new version 2.0.0 akamai-open/edgegrid-client as well, I'll start some investigation into the compatibility of this, though it still requires psr/log 1. I'll look into contributing an upgrade of psr/log at the akamai repo.

  • πŸ‡ΊπŸ‡ΈUnited States moshe weitzman Boston, MA

    Thanks guys for working on this. Looks like a significant effort. Much appreciated. I will be sure to review and merge once its ready.

  • πŸ‡¦πŸ‡ΊAustralia Feng-Shui

    Thanks for your time on this T-lo, happy to assist with testing etc.

  • πŸ‡ΊπŸ‡ΈUnited States Mile23 Seattle, WA

    Updating IS to reflect the blocker.

  • πŸ‡ΊπŸ‡ΈUnited States Owen Barton

    Looking through the forks of AkamaiOPEN-edgegrid-php-client I came across https://github.com/FranceMediasMonde/AkamaiOPEN-edgegrid-php-client which upgrades to psr/log v3 as well as some other dependencies.

  • πŸ‡ΊπŸ‡ΈUnited States moshe weitzman Boston, MA

    The recent composer failure for last patch is same as https://drupal.stackexchange.com/questions/293191/adding-repositories-in.... Its not possible to specify a fork in a contrib module since we can't use the repositories key - its a root-only key. In order to proceed with francemediasmonde/akamaiopen-edgegrid-php-client, I think we will need:

    1. Users of this module will need to add a 'repositories' entry to their project's composer.json
    2. We'll need to add this repository early on during the drupalci build See https://www.drupal.org/drupalorg/docs/drupal-ci/customizing-drupalci-tes... β†’ . This will get us past the current CI failure
  • πŸ‡¬πŸ‡§United Kingdom T-lo Bristol, UK

    Sorry, I had to commit that requirements change to get my test setup building locally.
    Still working through if it's a good fix.

    Thanks for the info about working with a fork.

  • πŸ‡¬πŸ‡§United Kingdom T-lo Bristol, UK

    I've just pushed commits updating deprecated functions, updating the version requirements and adding README file instructions around the repositories requirement in composer for the fork.
    The new client requirement appears to be functionally compatible, no reworking required for the switch.

    Given this change in akamai client to meet the psr/log requirement, we won't be able to support Drupal core under v10.0.3 going forwards, I would think that means this should be a new major version?

    @moshe, I had a read through the document on DrupalCI you linked, and it seems to suggest we can only customise the "assessment" stage of the run. I think we'd need to change the "build" stage of the run, do you know if that's documented elsewhere or if there's an example somewhere?

  • πŸ‡ΊπŸ‡ΈUnited States moshe weitzman Boston, MA

    Could we let the build stage do whatever it wants and we run our custom commands in Assessment to build codebase properly?

  • πŸ‡ΊπŸ‡ΈUnited States moshe weitzman Boston, MA

    My idea wont work. There is no way to customize DrupalCI's gather dependencies step and letting that run unmodified will produce a composer install error.

    So we need to move to Gitlab CI or just forego tests. I've requested Gitlab Ci for this project.

  • πŸ‡¨πŸ‡¦Canada Ambient.Impact Toronto

    @moshe weitzman If the issue is that you need to run custom commands before the composer install, we actually ran into this problem as well since we use the patches plug-in. If you look at our issue, we eventually figured out how to do it and why it didn't seem to work at first: #3307885-19: Customize DrupalCI config to allow running cweagans/composer-patches; fails otherwise β†’

    You can look at our drupalci.yml - we only needed it during the testing phase, but you should be able to copy it to the assessment phase. The catch is that there's up to a day's delay for it to actually take effect due how DrupalCI works on Drupal.org - I'm fairly sure it only runs the DrupalCI config in your default branch, i.e. not a merge request, and only uses a daily snapshot or something like that so it won't take effect right away. Hope that helps.

  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States jrglasgow Idaho

    I have made another few changes that were needed (causing PHP fatal errors) when running on my local development environment.

  • πŸ‡ΊπŸ‡ΈUnited States devkinetic

    Is there anyone running D9 on PHP 8.1 and this module? I am having some warning thrown in my logs from patriziotomato/edgegrid-php-client which has been archived (previously noted). We are not quite ready to jump to D10, and I can imagine that we are not the only ones in this situation. If its appropriate, I can create a new issue for D9 php 8 compatibility, but figured I'd comment here as it's possible a backport of the work done on this issue would be appropriate.

    Deprecated function: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in Akamai\Open\EdgeGrid\Authentication->buildQueryString() (line 683 of /var/application/vendor/akamai-open/edgegrid-auth/src/Authentication.php)

  • πŸ‡¬πŸ‡§United Kingdom T-lo Bristol, UK

    @devkinetic I'd suggest PHP 8 D9 would need to be a separate issue, as we've had to switch akamai library dependencies (to https://github.com/francemediasmonde/akamaiopen-edgegrid-php-client) here to accommodate Drupal 10's switch to psr/log 3.x.

    You may find switching to the main akamai-open/edgegrid-client library resolves some of your issues for PHP 8 D9

  • πŸ‡¬πŸ‡§United Kingdom T-lo Bristol, UK

    @moshe, I see the request to add GitLab CI was approved and the section now appears, however pipelines appear to be disabled.
    I added an initial .gitlab-ci.yml file in this branch hoping that would trigger it but it's not run.

    I wonder if someone with higher permissions on the repo needs to enable pipelines?

  • πŸ‡ΊπŸ‡ΈUnited States Mile23 Seattle, WA
  • πŸ‡ΊπŸ‡ΈUnited States moshe weitzman Boston, MA

    I touched this up and merged into a new 5.x branch. I've tagged a 5.0-rc1 release.

    FYI we are now using Gitlab CI from the Drupal Assoc for 4.x and 5.x branches.

    For more info on 4.x branch, see https://www.drupal.org/project/akamai/issues/3349938 πŸ› Drupal 9 with PHP 8 Fixed (will be merged soon)

    Thanks everyone!

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

  • Status changed to Fixed about 1 year ago
  • πŸ‡³πŸ‡±Netherlands euphoric_mv

    Hi,

    We are upgrading Drupal from 9 to 10, and we have to upgrade the Akamai module to version 5, but we have a problem with the version of package akamai-open/edgegrid-client. It requires version ^2.0.5 but the latest version of that package is 2.0.0 and the composer is complaining about that.
    Should I create a new issue for that problem?

  • πŸ‡¬πŸ‡§United Kingdom T-lo Bristol, UK

    @euphoric_mv see the readme file for the modification to your root composer file to import the correct dependancy.

  • πŸ‡³πŸ‡±Netherlands euphoric_mv

    @t-lo Thank you

Production build 0.69.0 2024