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

Issue fork akamai-3337078

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

jrglasgow created an issue. See original summary.

jrglasgow’s picture

Status: Active » Needs review

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.

rli’s picture

Status: Needs review » Needs work

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.

T-lo made their first commit to this issue’s fork.

t-lo’s picture

@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.

moshe weitzman’s picture

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

feng-shui’s picture

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

mile23’s picture

Issue summary: View changes

Updating IS to reflect the blocker.

owen barton’s picture

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.

moshe weitzman’s picture

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
t-lo’s picture

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.

t-lo’s picture

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?

moshe weitzman’s picture

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

moshe weitzman’s picture

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.

ambient.impact’s picture

@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.

jrglasgow’s picture

Status: Needs work » Needs review

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

devkinetic’s picture

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)

t-lo’s picture

@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

t-lo’s picture

@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?

mile23’s picture

moshe weitzman’s picture

Status: Needs review » Fixed

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 (will be merged soon)

Thanks everyone!

Status: Fixed » Closed (fixed)

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

euphoric_mv’s picture

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?

t-lo’s picture

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

euphoric_mv’s picture

@t-lo Thank you