Repository navigation
test: Add OpenMage composer quickstart and tests - #7133
Conversation
rpkoller
left a comment
There was a problem hiding this comment.
thanks for working on the composer based quickstart! found one small nitpick for the composer based quickstart in regard of the time when the ddev start is called.
aside that i wonder if it would make sense to switch the order of the two tabs from Git Clone Composer to Composer Git Clone. For other quickstarts the composer tab is usually first and the git clone comes after. and i wonder if it would make sense to also add the detail about git clone that it is mainly recommended for contributors on https://docs.openmage.org/users/install/use-composer/#create-new-project ?
and one question that is out of the scope for this quickstart and more of a question for the openmage project. would it be possible to simplify the composer based install so you only have a single ddev composer create command. that many composer config and init commands are sort of intimidating :D
but everything, the quickstart same as the test, work out fine in manual tests locally.
| ddev . wget -O .ddev/commands/web/openmage-install https://raw.githubusercontent.com/OpenMage/magento-lts/refs/heads/main/.ddev/commands/web/openmage-install | ||
| ddev start | ||
| ddev composer install |
There was a problem hiding this comment.
| ddev . wget -O .ddev/commands/web/openmage-install https://raw.githubusercontent.com/OpenMage/magento-lts/refs/heads/main/.ddev/commands/web/openmage-install | |
| ddev start | |
| ddev composer install | |
| ddev . wget -O .ddev/commands/web/openmage-install https://raw.githubusercontent.com/OpenMage/magento-lts/refs/heads/main/.ddev/commands/web/openmage-install | |
| ddev composer install |
There was a problem hiding this comment.
would it be possible to simplify the composer based install so you only have a single
ddev composer createcommand.
Already working on it - but i will take some days (internal reasons).
i wonder if it would make sense to also add the detail about git clone that it is mainly recommended for contributors on
Would it be enough to rename the tab to "Git clone (for contributors)" ?
There was a problem hiding this comment.
Already working on it - but i will take some days (internal reasons).
no rush
Would it be enough to rename the tab to "Git clone (for contributors)" ?
personally i am drawn. on one hand it might be enough renaming the tab, but if you take the perspective of a less technical person, and take into consideration that the concept of contribution isn't surfaced anywhere in the quickstarts guide, things might be potentially confusing for folks unfamiliar with the concept. so the other option might be instead of renaming the tab going with the Tip box inside the tab instead. that way it could be communicated that a git clone also contains all the branches of previous versions and so on. the consequences of that decision going with git clone might be unapparent other wise for some folks. and with a tip things could be clarified. what do others think about that detail?
There was a problem hiding this comment.
I don’t think we have had a quickstart setup similar to the current one for OpenMage source.
However, with @sreichel working on it, I don't mind at all that we're using the "Git clone (for contributors)". While the wording might be a bit long, it's quite descriptive to me.
There was a problem hiding this comment.
that way it could be communicated that a git clone also contains all the branches of previous versions and so on
Good point, but i think that details belongs to OM's documentation, not DDEV's. Imho, DDEV quickstart should contain the minimum instructions to start a new project, When using git clone you normaly know about branches or it should be in OM docs.
There was a problem hiding this comment.
Good point, but i think that details belongs to OM's documentation, not DDEV's. Imho, DDEV quickstart should contain the minimum instructions to start a new project, When using git clone you normaly know about branches or it should be in OM docs.
problem is you cant expect that people necessarily go to the openmage website to research what the details and caveats of the given approaches are. it is usually preferable to enable the user to make an informed decision in the current context without the need to branch out and do their own research. and i think in this case it wouldnt do any harm to elaborate on that detail in quickstart of ddev as well as in the OM docs. by having that detail in the ddev docs as well it would make it easier for the user to decide which approach to take. since each approach is copy and paste based you dont necessarily have to know the underlaying details. so having a brief disclaimer pointing out that caveat might be helpful.
from my point of view the idea of quickstarts is to be brief and actionable on one hand (so that you are able to install a new CMS you are not familiar within seconds) but at the same time to provide some important educational tidbits along the way necessary in the given context.
There was a problem hiding this comment.
There is no need to inform about other branches for git clone installation. v19 branch is outdated at becomes EOL with April 4th. v21/next branch is far behind and not maintained. There is only the main branch, that should be used.
Instead of adding more information here, https://docs.openmage.org/users/install/use-composer/#require-magento-lts has to be updated.
| ddev . wget -O .ddev/commands/web/openmage-install https://raw.githubusercontent.com/OpenMage/magento-lts/refs/heads/main/.ddev/commands/web/openmage-install | ||
| assert_success | ||
|
|
||
| # Silent OpenMage install with sample data | ||
| run ddev openmage-install -q |
There was a problem hiding this comment.
| ddev . wget -O .ddev/commands/web/openmage-install https://raw.githubusercontent.com/OpenMage/magento-lts/refs/heads/main/.ddev/commands/web/openmage-install | |
| assert_success | |
| # Silent OpenMage install with sample data | |
| run ddev openmage-install -q | |
| ddev . wget -O .ddev/commands/web/openmage-install https://raw.githubusercontent.com/OpenMage/magento-lts/refs/heads/main/.ddev/commands/web/openmage-install | |
| assert_success | |
| run ddev mutagen sync | |
| assert_success | |
| # Silent OpenMage install with sample data | |
| run ddev openmage-install -q |
the test currently fails because the openmage-install command is not found. locally the test works just fine. so i wonder if it is another timing problem and files downloaded are not available yet for mutagen so lets see if ddev mutagen sync is fixing that failure
There was a problem hiding this comment.
Seems to work now. Thanks.
Do you have an idea for better access to openmage-install command, not using wget? Move that custom commands to a ddev-addon? And them automatically add it when project-type is "openmage"?
There was a problem hiding this comment.
hmmm that is probably a question better suited for randy or stas, since both know the whole development part and the ddev internals inside out, but i wonder if you already have a project type openmage why not provide the openmage-install command in the context of that project type? isnt that the purpose of a project type exactly for cases like that (in particular if there is a project type already in place)? with a project type you are able to provide files (https://ddev.readthedocs.io/en/stable/developers/project-types/ "You’ll likely need templates for settings files, use the Drupal or TYPO3 templates as examples, for example pkg/ddevapp/drupal and pkg/ddevapp/typo3. Those templates have to be loaded at runtime as well")
There was a problem hiding this comment.
I think the openmage-install command should be provided by DDEV if it's a DDEV-specific command.
However, before that, OpenMage should have a dedicated GitHub starter project that’s published to Packagist. This way, it won’t be limited to DDEV, and people will be able to use it with other tools as well.
It would be similar to projects like https://github.com/symfony/skeleton or https://github.com/laravel/laravel
(Initially, I thought https://github.com/OpenMage/magento-lts was that project, but I realize now that it’s not.)
There was a problem hiding this comment.
I don’t think we have had a quickstart setup similar to the current one for OpenMage source.
OpenMage is the inofficial successor to Magento 1, that hit EOL some years ago. There was no support for composer at all. We have added composer components, but never cared about a "starter project" like Drupal/Symfony/Laravel.
This had should be done long time ago, instead if relying on multiple composer commands.
Thanks for showing importance of it. (I use git nearly 99% the time, i did not see it.).
think the
openmage-installcommand should be provided by DDEV if it's a DDEV-specific command.However, before that, OpenMage should have a dedicated GitHub starter project that’s published to Packagist.
That would be great. There will be a composer "starter project"" asap, while working on next level.
I think that PR is ready to merge, but beyond that:
- create OM composer starter project
- complete fix: add project-type
openmage#7135 - update DDEV tests and docs (syned to updated OM)
Co-authored-by: Ralf Koller <[email protected]>
Co-authored-by: Ralf Koller <[email protected]>
Co-authored-by: Ralf Koller <[email protected]>
stasadev
left a comment
There was a problem hiding this comment.
It looks good and the tests are good, thank you!
I pushed one more small commit b4cd3ff (#7133)
- use
ddev execinstead ofddev ., because dot is an alias, not the main command - improve a note about
docroot - move info about OpenMage commands to "Git Clone (for contributors)" tab
|
I want to merge this, so we can have a working Composer quickstart for OpenMage in the stable documentation (we have a release in the upcoming days.) @rpkoller any comments? |
|
@rpkoller anything i can do here? I'd leave as it is and update as soon there is a composer starter project (and updated docs). |
|
@sreichel one workflow comment - When you update the branch in a PR, could you use the "rebase" technique when possible? When you use the merge commit technique it prevents it from being rebased later. (I know GitHub offers the merge commit technique as default.) |
|
Thanks so much for all the effort on behalf of OpenMage! We'll look forward to future maintenance as things progress! |
|
@rfay thanks. I'll use rebase from now :) |
## 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 - Drop `--no-security-blocking` from the test, and 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]>
## 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, which has no lock file, so Composer checks advisories; the git test installs from upstream's lock, where Composer skips that 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]>
## 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]>
## 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]>

Follow-up to #7091, adding composer quickstart.
docs:
https://ddev--7133.org.readthedocs.build/en/7133/users/quickstart/#openmage