Skip to content

docs(quickstart): fix OpenMage Composer install - #9021

Merged
stasadev merged 1 commit into
ddev:mainfrom
stasadev:20261027_stasadev_openmage_quickstart
Oct 27, 2026
Merged

stasadev merged 1 commit into
ddev:mainfrom
stasadev:20261027_stasadev_openmage_quickstart

Conversation

@stasadev

@stasadev stasadev commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

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). 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 in the test with composer config policy.advisories.block false in the docs and the test, because OpenMage's own composer.json disables advisory blocking. If upstream drops that setting, the quickstart should drop it too
  • 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 #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. 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

@stasadev
stasadev requested a review from a team as a code owner October 27, 2026 14:26
@stasadev stasadev changed the title docs(quickstart): update OpenMage for vaimo/composer-patches and stable dependencies docs(quickstart): fix OpenMage Composer install 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` in the test with `composer config policy.advisories.block false` in the docs and the test, because OpenMage's own `composer.json` disables advisory blocking. If upstream drops that setting, the quickstart should drop it too
- 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]>
@stasadev
stasadev force-pushed the 20261027_stasadev_openmage_quickstart branch from 8746df0 to 8dc5e49 Compare October 27, 2026 14:47

@rfay rfay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, IMO this can go in whenever you want.

@stasadev
stasadev merged commit 6cde25f into ddev:main Oct 27, 2026
11 of 12 checks passed
@stasadev
stasadev deleted the 20261027_stasadev_openmage_quickstart branch October 27, 2026 16:06
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.

2 participants