3

I'm trying to set up testing using the GitLab template for contrib modules.

In the module's composer.json, PHP 8.2 is required, and since the CI is currently defaulting to 8.1, the install fails.

So, based on the variables documentation, I tried adding the following to .gitlab-ci.yml:

variables:
  _TARGET_PHP: "8.3"

When I pushed and the pipeline ran, it was still at PHP 8.1.

So then I tried:

variables:
  _TARGET_PHP: "CORE_PHP_MAX"

Which according to the docs linked above is currently 8.3.

However, that failed too-- still stuck at 8.1.

How do I set the PHP version for GitLab CI for a contrib module?

1 Answer 1

1
+50

This should work.

variables:
  CORE_PHP_MIN: "8.2"

You can use _TARGET_PHP: "8.3" on a job like composer and PHPUnit. There are a few ways you can do this. Which project are you working on? I want to look at your pipeline.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.