Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do i fix a pipline compose php version problem?

krsrk_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 20, 2023
When the pipelines executes it throws a php error version requirements:
Problem 1

- Root composer.json requires php ^8.1 but your php version (8.0.6) does not satisfy that requirement.

How do i fix that?
I'm using the composer image: composer:2.0
With a PHP pipeline bitbucket template.

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 21, 2023

Hi @krsrk_ and welcome to the community!

Just to give you some context, Pipelines builds run in Docker containers. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file. We support public and private Docker images including those hosted on Docker Hub, AWS, GCP, Azure and self-hosted registries accessible on the internet.

If you are using image: composer:2.0, then the following Dockerhub image will be used with the tag 2.0:

If you select the tab Tags on that image's page, you will see that there are newer tags (versions of this image).

I see that composer:2.1 has PHP 8.1.1 installed, composer:2.5 has PHP 8.2.5 installed. You can try using any of these images in your bitbucket-pipelines.yml file.

If you have Docker installed on your computer, you can check the php version in a certain Docker image by running first the following command on a terminal on your computer:

docker run -it --entrypoint=/bin/bash composer:2.5

where composer:2.5 you can replace with any other Docker image and tag you want to check. This will start a Docker container based on this image and a bash prompt when the container starts. In the bash prompt of the container, you can run php --version to see what version of php is installed in that specific container.

Please feel free to let me know if you have any questions!

Kind regards,
Theodora

0 votes
Mia Paulin April 20, 2023

@mention Learned this from my mentors at Data center, server and Trello, so I'm going to answer this and make them proud!  The version of the software you are using needs a more current version of PHP, 8.1 or higher.  You have 8.0.6 which is an older version.  Upgrade your version of PHP and back/save files you have and it should work.  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events