0

The error being thrown is as follows: league/uri 6.8.0 requires php >=8.1 but your php version (8.0.11) does not satisfy that requirement.

A similar question was posed here Error "Root composer.json requires php ^7.3 but your php version (8.0.0) does not satisfy that requirement", but this is for requiring an older version. It's asking me for the newest version.

I tried requiring php >= 8.1 in the composer.json file, but that just lead to the same error for Root composer.json instead of league/uri. My ide and my machine are using 8.1.9 and 8.1.5 respectively. So I guess my real question is where is gitlab looking to find this other version of php and how to I update that?

Clarification [edited]: the error is being thrown during the Build Code job on gitlab CI/CD. I push any changes up from my ide, and the build fails. There's 4 different modules that are all giving me same error.

I've narrowed it down to my pipeline configuration needing to be fixed, but I've never done this before. I suppose this question can be closed since I understand the error message now? It's on me to close the knowledge gap.

  • But what are you using on the command line? Try `php -v` on the command line – aynber Oct 10 '22 at 19:09
  • php -v returns PHP 8.1.9 (cli) (built: Aug 25 2022 13:50:19) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.9, Copyright (c) Zend Technologies with Zend OPcache v8.1.9, Copyright (c), by Zend Technologies – Thor Mozart Oct 10 '22 at 19:16
  • Are you using docker, some virtual machine or similar? Can you exlain your environment a bit more? _"I tried requiring php >= 8.1 in the composer.json file"_ - That just tells composer what minimum version is needed to install and won't change what version it detects. – M. Eriksson Oct 10 '22 at 19:27
  • 2
    _"the error is being thrown during the Build Code section on gitlab"_ - Well, that has nothing to do with your local PHP version. Seems like it's your build script that uses PHP 8.0.11. How is your build script set up? – M. Eriksson Oct 10 '22 at 19:29
  • I'm using the Acquia Cloud IDE and Acquia Code Studio. I was accidentally working on the main branch and broke something. I also made recent update clarifying where the error is getting thrown. It's getting thrown in Code Studio, which is a drupal-specific gitlab platform. – Thor Mozart Oct 10 '22 at 19:30
  • @M.Eriksson the build script is in gitlab. – Thor Mozart Oct 10 '22 at 19:31
  • Yes, I get that it's in Gitlab, my question was how it was set up. You can create build scripts in multiple ways. Somewhere, there need to be something that tells Gitlab what PHP version to use and how to build the application. That's what you need to find and change to use 8.1. – M. Eriksson Oct 10 '22 at 19:32
  • Please share more details. How is your problem directly related to Drupal or Acquia? – Nico Haase Oct 11 '22 at 07:01
  • "the error is being thrown during the Build Code job on gitlab CI/CD" - please share more details. Which PHP version does that "Build Code job" use? – Nico Haase Oct 12 '22 at 06:09

0 Answers0