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.0With a PHP pipeline bitbucket template.
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
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.