github-actions-magento2
github-actions-magento2 copied to clipboard
chore: fix composer version dependency for nightly
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
Can be seen here: https://github.com/mage-os/mageos-magento2/actions/runs/3518127417/jobs/5896696727
The nightly builds work again, now only the integration check action fails
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.
For reference: https://github.com/laminas/laminas-dependency-plugin/commit/54d508ab145072c4c7e7ec07cdad1e10196ad373
This upstream PR will resolve the situation once it's merged, too: https://github.com/magento/magento2/pull/36495
Thank you ALL for your help, this was amazingly thorough and I appreciate you all!
Now just wait for the Magento Open Source PR to be merged so we can revert this. #pingPong