Skip to content

test(openmage): add --no-security-blocking to openmage.bats for Composer 2.9 compatibility [skip buildkite] - #8092

Merged
rfay merged 1 commit into
ddev:mainfrom
rfay:20260202_rfay_openmage_advisory
Feb 3, 2026
Merged

rfay merged 1 commit into
ddev:mainfrom
rfay:20260202_rfay_openmage_advisory

Conversation

@rfay

@rfay rfay commented Feb 3, 2026

Copy link
Copy Markdown
Member

The Issue

OpenMage tests are failing in CI due to Composer 2.9's automatic security blocking feature. Composer 2.9 blocks installation of packages with known security advisories by default. OpenMage has 19 security advisories on Packagist, causing the composer install commands to fail.

How this PR solves the Issue

Added the --no-security-blocking flag (introduced in Composer 2.9.2) to both ddev composer install commands in openmage.bats.

This allows the tests to bypass Composer 2.9's security blocking and continue testing OpenMage installation functionality.

  1. Run the openmage tests with Composer 2.9+: bash cd docs/tests bats openmage.bats
  2. Verify both test cases pass:
    • "OpenMage git based quickstart"
    • "OpenMage composer based quickstart"

This is a test-only change with no impact on DDEV functionality. OpenMage is a legacy platform with known security advisories that are unlikely to be resolved due to backward compatibility requirements. Users installing OpenMage will need to use similar workarounds with Composer 2.9+.

…mpatibility [skip buildkite]

OpenMage tests are failing in CI due to Composer 2.9's automatic security blocking feature. Composer 2.9 blocks installation of packages with known security advisories by default. OpenMage has 19 security advisories on Packagist, causing the composer install commands to fail.

Added the `--no-security-blocking` flag (introduced in Composer 2.9.2) to both `ddev composer install` commands in openmage.bats.

This allows the tests to bypass Composer 2.9's security blocking and continue testing OpenMage installation functionality.

1. Run the openmage tests with Composer 2.9+:
   ```bash
   cd docs/tests
   bats openmage.bats
   ```
2. Verify both test cases pass:
   - "OpenMage git based quickstart"
   - "OpenMage composer based quickstart"

The existing test coverage is sufficient - the openmage.bats tests will now pass with Composer 2.9+.

This is a test-only change with no impact on DDEV functionality. OpenMage is a legacy platform with known security advisories that are unlikely to be resolved due to backward compatibility requirements. Users installing OpenMage will need to use similar workarounds with Composer 2.9+.

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@rfay
rfay marked this pull request as ready for review February 3, 2026 02:28
@rfay
rfay requested a review from a team as a code owner February 3, 2026 02:28
@rfay
rfay merged commit 3f1bc22 into ddev:main Feb 3, 2026
8 checks passed
@rfay
rfay deleted the 20260202_rfay_openmage_advisory branch February 3, 2026 02:29
stasadev added a commit to stasadev/ddev that referenced this pull request Oct 27, 2026
## Short Summary (TL;DR)

The OpenMage Composer quickstart failed because `openmage/magento-lts` v20.19.0 replaced `cweagans/composer-patches` with `vaimo/composer-patches`, which our `allow-plugins` list blocked. This PR updates the quickstart and its test so they follow current OpenMage.

## The Issue

`ddev composer install` in the Composer quickstart now stops with `vaimo/composer-patches contains a Composer plugin which is blocked by your allow-plugins config` ([failed run](https://github.com/ddev/ddev/actions/runs/40505130978/job/122192384166)). Upstream's DDEV page links to our quickstart as its install guide, so our steps are the ones users follow.

The quickstart also had older problems:

- `composer init -s dev` without `prefer-stable` resolved every dependency to a dev branch, for example `symfony/string 6.4.x-dev` and `monolog/monolog dev-main`
- It pinned PHP 8.1, which is EOL
- The test used `--no-security-blocking`, but the docs did not

## How This PR Solves The Issue

- Allow `vaimo/composer-patches` instead of `cweagans/composer-patches`, and require `openmage/magento-lts:^20.19`
- Add `composer config prefer-stable true`; `-s dev` stays because `magento-lts` requires `flowjs/flowjs:dev-master`
- Drop `extra.enable-patching`, because vaimo applies dependency patches by default and reads that key only when it is `false`
- Pin PHP 8.3 instead of 8.1, not DDEV's default 8.4: on PHP 8.4, OpenMage's `#[Deprecated]` attributes emit notices, and developer mode turns them into an error page on the admin dashboard
- Replace `--no-security-blocking` with `COMPOSER_NO_BLOCKING=1` in the composer test only. When OpenMage publishes an advisory before the fixed release, Composer blocks every allowed version, as in ddev#8092, and only upstream can fix that. The git test installs from upstream's lock, where Composer skips the advisory check
- Run the test steps in the same order as the docs
- Log into the admin in the test, because the PHP 8.4 error appears only after login

A starter project would replace most of these steps. In ddev#7133, DDEV asked OpenMage for one, similar to `symfony/skeleton`. As of today, the `OpenMage/skeleton` repository is empty and Packagist has no starter package. `ddev composer create-project openmage/magento-lts` works, but the project root then becomes OpenMage's own repository, so this PR keeps the dependency flow.

## Manual Testing Instructions

Follow both OpenMage tabs in the [quickstart preview](https://ddev--9020.org.readthedocs.build/en/9020/users/quickstart/#openmage). Log in as `admin` with `veryl0ngpassw0rd`, and expect the dashboard with no error page.

## Automated Testing Overview

`docs/tests/openmage.bats` covers both quickstarts.

🤖 Developed with assistance from [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant