pyguerder/bitbucket-pipelines-php82

composer-runtime-api 2.2

Closed this issue · 5 comments

I gave this image a go today and it looks promising - it will replace my use of three images in the pipeline (atlassian/default-image:4, composer and php:8.2-alpine)

However I am building Laravel 10.26.2 and it has this in the composer.lock:

            "require": {
                ...
                "composer-runtime-api": "^2.2",

composer install then stops with:

Your lock file does not contain a compatible set of packages. Please run composer update.
  Problem 1
    - laravel/framework is locked to version v10.26.2 and an update of this package was not requested.
    - laravel/framework v10.26.2 requires composer-runtime-api ^2.2 -> found composer-runtime-api[2.0.0] but it does not match the constraint.
  Problem 2
    - laravel/framework v10.26.2 requires composer-runtime-api ^2.2 -> found composer-runtime-api[2.0.0] but it does not match the constraint.
    - spatie/laravel-ignition 2.3.0 requires illuminate/support ^10.0 -> satisfiable by laravel/framework[v10.26.2].
    - spatie/laravel-ignition is locked to version 2.3.0 and an update of this package was not requested.

I could run composer update in the pipeline but it would be nice to carry on with the same lockfile as in the repo for testing etc. Would it be possible for this image to use composer 2.2 or greater?

I've put this at the top of my pipeline:

            - export COMPOSER_ALLOW_SUPERUSER=1
            - export COMPOSER_VERSION=2.6.5
            - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=$COMPOSER_VERSION

and that is a good workaround, so now the entire pipeline is running within a single image, which is great, it seems to have saved about 30sec to 1min per run.

Hi @sfreytag! I am quite busy at this time, but I will look at this issue when I get a moment! Thanks!

Hi @sfreytag it should be good now!

As a reminder for my myself, I just had to run docker pull composer and build this image again.

Regards

Thanks! Will give it a go next week.

Yep, worked - thanks very much!