github-actions-magento2 icon indicating copy to clipboard operation
github-actions-magento2 copied to clipboard

chore: fix composer version dependency for nightly

Open Vinai opened this issue 2 years ago • 2 comments
trafficstars

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/graycoreio/github-actions-magento2/blob/main/CONTRIBUTING.md#commit
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [x] CI related changes
  • [ ] Documentation content changes
  • [ ] Other... Please describe:

What is the current behavior?

Nightly builds initialize the required php infra with

   - name: Set PHP version
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ inputs.php-version }}
        tools: composer:v${{ inputs.composer-version }}
        coverage: none

The value for inputs.composer-version is 2. This currently pulls in composer 2.4.2.

However, the result is a broken upstream nightly and mageos nightly build. When composer install is run while determining the base package dependencies, it fails with the error:

    - laminas/laminas-dependency-plugin 2.5.0 requires composer-plugin-api >=1.1.0 <2.3.0
           -> found composer-plugin-api[2.3.0] but it does not match the constraint.

What is the new behavior?

This MR changes the value for inputs.composer-version to 2.2.
This installs a compatible composer version.

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

Other information

Reference

Vinai avatar Nov 20 '22 15:11 Vinai

Can be seen here: https://github.com/mage-os/mageos-magento2/actions/runs/3518127417/jobs/5896696727

DavidLambauer avatar Nov 21 '22 21:11 DavidLambauer

The nightly builds work again, now only the integration check action fails

Bildschirm­foto 2022-11-27 um 17 53 37

Here is the workflow log: https://github.com/mage-os/generate-mirror-repo-js/actions/runs/3559043629/jobs/5978230306

This commit to the package generation action fixed the builds.
The same change to the composer version needs to be made for the next version in the matrix., which is this PR.

Vinai avatar Nov 27 '22 16:11 Vinai

For reference: https://github.com/laminas/laminas-dependency-plugin/commit/54d508ab145072c4c7e7ec07cdad1e10196ad373

jissereitsma avatar Nov 29 '22 07:11 jissereitsma

This upstream PR will resolve the situation once it's merged, too: https://github.com/magento/magento2/pull/36495

Vinai avatar Nov 29 '22 09:11 Vinai

Thank you ALL for your help, this was amazingly thorough and I appreciate you all!

damienwebdev avatar Nov 29 '22 14:11 damienwebdev

Now just wait for the Magento Open Source PR to be merged so we can revert this. #pingPong

Vinai avatar Nov 29 '22 16:11 Vinai