Repository: ddev/ddev
Pull request #7091: test: add OpenMage/Magento 1 quickstart test and split it from Magento 2, for #7094
Author: login: sreichel
Labels: name: maintenance
Created: 2025-03-14T21:47:34Z | Merged: 2025-03-19T20:15:32Z

## The Issue

- #7094 

* Split openmage into its own quickstart
* Use git clone instead of zipball download
* Add quickstart test for it

Rendered updated docs at:

- https://ddev--7091.org.readthedocs.build/en/7091/users/quickstart/#magento-2
- https://ddev--7091.org.readthedocs.build/en/7091/users/quickstart/#openmage




Diff:
diff --git a/docs/content/users/quickstart.md b/docs/content/users/quickstart.md
index e2ea27e7bab..df8e1628402 100644
--- a/docs/content/users/quickstart.md
+++ b/docs/content/users/quickstart.md
@@ -590,90 +590,71 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 !!!tip "Add Vite support?"
     Since Laravel v9.19, Vite is included as the default [asset bundler](https://laravel.com/docs/vite). There are small tweaks needed in order to use it: [Working with Vite in DDEV - Laravel](https://ddev.com/blog/working-with-vite-in-ddev/#laravel).
 
-## Magento
+## Magento 2
 
-=== "Magento 2"
+Normal details of a Composer build for Magento 2 are on the [Magento 2 site](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/composer.html). You must have a public and private key to install from Magento’s repository. When prompted for “username” and “password” in `composer create`, it’s asking for your public key as "username" and private key as "password".
 
-    Normal details of a Composer build for Magento 2 are on the [Magento 2 site](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/composer.html). You must have a public and private key to install from Magento’s repository. When prompted for “username” and “password” in `composer create`, it’s asking for your public key as "username" and private key as "password".
+!!!tip "Store Adobe/Magento Composer credentials in the global DDEV config"
+    If you have Composer installed on your workstation and have an `auth.json` you can reuse the `auth.json` by making a symlink. See [In-Container Home Directory and Shell Configuration](extend/in-container-configuration.md):
 
-    !!!tip "Store Adobe/Magento Composer credentials in the global DDEV config"
-        If you have Composer installed on your workstation and have an `auth.json` you can reuse the `auth.json` by making a symlink. See [In-Container Home Directory and Shell Configuration](extend/in-container-configuration.md):
-
-        ```
-        mkdir -p ~/.ddev/homeadditions/.composer && ln -s ~/.composer/auth.json ~/.ddev/homeadditions/.composer/auth.json
-        ```
-
-        Alternately, you can install the Adobe/Magento Composer credentials in your global `~/.ddev/homeadditions/.composer/auth.json` and never have to enter them again (see below):
-
-        ??? "Script to store Adobe/Magento Composer credentials (click me)"
-            ```bash
-            # Enter your username/password and agree to store your credentials
-            ddev_dir="$(ddev version -j | docker run -i --rm ddev/ddev-utilities jq -r ".raw.\"global-ddev-dir\" | select (.!=null) // \"$HOME/.ddev\"" 2>/dev/null)"
-            mkdir -p $ddev_dir/homeadditions/.composer
-            docker_command=("docker" "run" "-it" "--rm" "-v" "$ddev_dir/homeadditions/.composer:/composer" "--workdir=/tmp" "-e" "COMPOSER_HOME=/composer" "--user" "$(id -u):$(id -g)")
-            auth_json_path="$ddev_dir/homeadditions/.composer/auth.json"
-            if [ -L "$auth_json_path" ]; then
-                # If auth.json is a symlink, add the optional mount
-                auth_json_dir=$(dirname "$(readlink -f "$auth_json_path")")
-                docker_command+=("-v" "$auth_json_dir:$auth_json_dir")
-            fi
-            image="$(ddev version -j | docker run -i --rm ddev/ddev-utilities jq -r ".raw.web | select (.!=null)" 2>/dev/null)"
-            docker_command+=("$image" "bash" "-c" "composer create --repository https://repo.magento.com/ magento/project-community-edition --no-install")
-            # Execute the command to store credentials
-            "${docker_command[@]}"
-            ```
-
-    ```bash
-    export MAGENTO_HOSTNAME=my-magento2-site
-    mkdir ${MAGENTO_HOSTNAME} && cd ${MAGENTO_HOSTNAME}
-    ddev config --project-type=magento2 --docroot=pub --upload-dirs=media --disable-settings-management
-    ddev add-on get ddev/ddev-elasticsearch
-    ddev start -y
-    ddev composer create --repository https://repo.magento.com/ magento/project-community-edition
-    rm -f app/etc/env.php
-
-    ddev magento setup:install --base-url="https://${MAGENTO_HOSTNAME}.ddev.site/" \
-        --cleanup-database --db-host=db --db-name=db --db-user=db --db-password=db \
-        --elasticsearch-host=elasticsearch --search-engine=elasticsearch7 --elasticsearch-port=9200 \
-        --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \
-        --admin-user=admin --admin-password=Password123 --language=en_US
-
-    ddev magento deploy:mode:set developer
-    ddev magento module:disable Magento_TwoFactorAuth Magento_AdminAdobeImsTwoFactorAuth
-    ddev config --disable-settings-management=false
-    # Change the backend frontname URL to /admin_ddev
-    ddev magento setup:config:set --backend-frontname="admin_ddev" --no-interaction
-    # Login using `admin` user and `Password123` password
-    ddev launch /admin_ddev
+    ```
+    mkdir -p ~/.ddev/homeadditions/.composer && ln -s ~/.composer/auth.json ~/.ddev/homeadditions/.composer/auth.json
     ```
 
-    Change the admin name and related information as needed.
+    Alternately, you can install the Adobe/Magento Composer credentials in your global `~/.ddev/homeadditions/.composer/auth.json` and never have to enter them again (see below):
+
+    ??? "Script to store Adobe/Magento Composer credentials (click me)"
+        ```bash
+        # Enter your username/password and agree to store your credentials
+        ddev_dir="$(ddev version -j | docker run -i --rm ddev/ddev-utilities jq -r ".raw.\"global-ddev-dir\" | select (.!=null) // \"$HOME/.ddev\"" 2>/dev/null)"
+        mkdir -p $ddev_dir/homeadditions/.composer
+        docker_command=("docker" "run" "-it" "--rm" "-v" "$ddev_dir/homeadditions/.composer:/composer" "--workdir=/tmp" "-e" "COMPOSER_HOME=/composer" "--user" "$(id -u):$(id -g)")
+        auth_json_path="$ddev_dir/homeadditions/.composer/auth.json"
+        if [ -L "$auth_json_path" ]; then
+            # If auth.json is a symlink, add the optional mount
+            auth_json_dir=$(dirname "$(readlink -f "$auth_json_path")")
+            docker_command+=("-v" "$auth_json_dir:$auth_json_dir")
+        fi
+        image="$(ddev version -j | docker run -i --rm ddev/ddev-utilities jq -r ".raw.web | select (.!=null)" 2>/dev/null)"
+        docker_command+=("$image" "bash" "-c" "composer create --repository https://repo.magento.com/ magento/project-community-edition --no-install")
+        # Execute the command to store credentials
+        "${docker_command[@]}"
+        ```
 
-    The admin login URL is specified by `frontName` in `app/etc/env.php`.
+```bash
+export MAGENTO_HOSTNAME=my-magento2-site
+mkdir ${MAGENTO_HOSTNAME} && cd ${MAGENTO_HOSTNAME}
+ddev config --project-type=magento2 --docroot=pub --upload-dirs=media --disable-settings-management
+ddev add-on get ddev/ddev-elasticsearch
+ddev start -y
+ddev composer create --repository https://repo.magento.com/ magento/project-community-edition
+rm -f app/etc/env.php
+
+ddev magento setup:install --base-url="https://${MAGENTO_HOSTNAME}.ddev.site/" \
+    --cleanup-database --db-host=db --db-name=db --db-user=db --db-password=db \
+    --elasticsearch-host=elasticsearch --search-engine=elasticsearch7 --elasticsearch-port=9200 \
+    --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \
+    --admin-user=admin --admin-password=Password123 --language=en_US
+
+ddev magento deploy:mode:set developer
+ddev magento module:disable Magento_TwoFactorAuth Magento_AdminAdobeImsTwoFactorAuth
+ddev config --disable-settings-management=false
+# Change the backend frontname URL to /admin_ddev
+ddev magento setup:config:set --backend-frontname="admin_ddev" --no-interaction
+# Login using `admin` user and `Password123` password
+ddev launch /admin_ddev
+```
 
-    You may want to add the [Magento 2 Sample Data](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/sample-data/composer-packages.html) with:
+Change the admin name and related information as needed.
 
-    ```
-    ddev magento sampledata:deploy
-    ddev magento setup:upgrade
-    ```
+The admin login URL is specified by `frontName` in `app/etc/env.php`.
 
-=== "OpenMage/Magento 1"
+You may want to add the [Magento 2 Sample Data](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/sample-data/composer-packages.html) with:
 
-    ```bash
-    mkdir my-magento1-site && cd my-magento1-site
-    tag=$(curl -L "https://api.github.com/repos/OpenMage/magento-lts/releases/latest" | docker run -i --rm ddev/ddev-utilities jq -r .tag_name) && curl -L "https://github.com/OpenMage/magento-lts/releases/download/$tag/openmage-$tag.zip" -o openmage.zip
-    unzip ./openmage.zip && rm -f openmage.zip
-    ddev config --project-type=magento --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
-    ddev start
-    # Install openmage and optionally install sample data
-    ddev openmage-install
-    ddev launch /admin
-
-    # Note that openmage itself provides several custom DDEV commands, including
-    # `openmage-install`, `openmage-admin`, `phpmd`, `rector`, `phpcbf`, `phpstan`, `vendor-patches`,
-    # and `php-cs-fixer`.
-    ```
+```
+ddev magento sampledata:deploy
+ddev magento setup:upgrade
+```
 
 ## Moodle
 
@@ -769,6 +750,29 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+=== "Git Clone"
+
+    ```bash
+    mkdir my-openmage-site && cd my-openmage-site
+    git clone https://github.com/OpenMage/magento-lts .
+    ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
+    ddev start
+    ddev composer install
+    # Silent OpenMage install with sample data
+    # See `ddev openmage-install -h` for more options
+    ddev openmage-install -q
+    # Login using `admin` user and `veryl0ngpassw0rd` password
+    ddev launch /admin
+    ```
+
+Note that OpenMage itself provides several custom DDEV commands, including
+`openmage-install`, `openmage-admin`, `phpmd`, `rector`, `phpcbf`, `phpstan`, `vendor-patches`,
+and `php-cs-fixer`.
+
+Read more about [OpenMage](https://docs.openmage.org).
+
 ## Pimcore
 
 === "Composer"
diff --git a/docs/tests/openmage.bats b/docs/tests/openmage.bats
new file mode 100644
index 00000000000..1712cd667f4
--- /dev/null
+++ b/docs/tests/openmage.bats
@@ -0,0 +1,54 @@
+#!/usr/bin/env bats
+
+setup() {
+  PROJNAME=my-openmage-site
+  load 'common-setup'
+  _common_setup
+}
+
+# executed after each test
+teardown() {
+  _common_teardown
+}
+
+@test "OpenMage git based quickstart with $(ddev --version)" {
+  run mkdir ${PROJNAME} && cd ${PROJNAME}
+  assert_success
+
+  run git clone --depth=1 https://github.com/OpenMage/magento-lts .
+  assert_success
+
+  run ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
+  assert_success
+
+  run ddev start -y
+  assert_success
+
+  run ddev composer install
+  assert_success
+
+  # Silent OpenMage install with sample data
+  run ddev openmage-install -q
+  assert_success
+
+  run bash -c "DDEV_DEBUG=true ddev launch"
+  assert_output "FULLURL https://${PROJNAME}.ddev.site"
+  assert_success
+
+  # validate running project
+  run curl -sfI https://${PROJNAME}.ddev.site
+  assert_success
+  assert_output --partial "server: nginx"
+  assert_output --partial "HTTP/2 200"
+  assert_output --partial "set-cookie: om_frontend"
+
+  # Check if the frontend is working
+  run curl -sf https://${PROJNAME}.ddev.site
+  assert_success
+  assert_output --partial "2020 OpenMage Demo Store. All Rights Reserved."
+
+  # Check if the admin is working
+  run curl -sf https://${PROJNAME}.ddev.site/index.php/admin/
+  assert_success
+  assert_output --partial "Log into OpenMage Admin Page"
+}


Reviews:
user: login: rpkoller
body: At first thank you for working on the bats test! I've made a few observations going through the test: 

at first one fundamental question, the goal of those bats tests is to mirror the corresponding quickstart and make sure to notice anything breaking early on by running those regular tests, but the bats test you've created uses another approach (git clone based) than the quickstart  https://ddev.readthedocs.io/en/stable/users/quickstart/#magento-openmagemagento-1 (zip archive downloaded by curl). you are the expert and regular user of openmage/magento 1, so the question would be what is the best practice for setting up an instance of openmage these days from your point of view, by downloading a zip archive or better by git clone? in consequence it would be either necessary to adjust the quickstart to the approach you are using in the bats test, or adjust the bats test to the approach used in the quickstart? which would be the preferable way? 

`run ddev config --project-type=magento --php_version=8.1 --webserver_type=nginx-fpm` is using the wrong syntax. instead of underscores it is necessary to use hyphens: `run ddev config --project-type=magento --php-version=8.1 --webserver-type=nginx-fpm`

you are using ` run ddev start -y`which is the preferable way to start ddev, but the openmage quickstart needs to reflect that as well. would it be possible to add the `-y`to the quickstart as well? it can be found at: docs/content/users/quickstart.md

and aside the assertion for ddev launch a few more checks could be added. a few suggestions are included in the following snippet: 
```
  run curl -sfI https://${PROJNAME}.ddev.site
  assert_success
  assert_output --partial "server: nginx"
  assert_output --partial "HTTP/2 200"
  assert_output --partial "set-cookie: om_frontend"
  run curl -sf https://${PROJNAME}.ddev.site
  assert_success
  assert_output --partial "2020 OpenMage Demo Store. All Rights Reserved."
  run curl -sf https://${PROJNAME}.ddev.site/index.php/customer/account/login/
  assert_success
  assert_output --partial "<title>Customer Login</title>"
  assert_output --partial "2020 OpenMage Demo Store. All Rights Reserved."
```
 

state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-15T02:03:51Z
user: login: rpkoller
body: found a few more details on the PR. and one remark about splitting openmage and magento2. at first i was a bit reluctant and puzzled cuz i thought magento2 and openmage are just two different major versions of magento but on closer look they are not. so splitting up the two in the quickstart is a good thing. thank you for that as well as for all the work so far!  
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T03:09:33Z
user: login: sreichel
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T03:29:59Z
user: login: sreichel
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T03:39:34Z
user: login: rpkoller
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T15:35:32Z
user: login: stasadev
body: Rebased and fixed markdown.

Select `Hide whitespace` checkbox when doing a review:

![whitespaces](https://github.com/user-attachments/assets/db094437-4343-4ea8-b4a5-bde865c21d61)


state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-19T10:46:22Z
user: login: rpkoller
body: overall it looks good and very close, thank you! i've only found two remaining details to note. 
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-19T12:35:50Z
user: login: stasadev
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T13:11:11Z
user: login: stasadev
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T13:12:39Z
user: login: stasadev
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T13:17:50Z
user: login: sreichel
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-19T13:23:52Z
user: login: stasadev
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T13:40:11Z
user: login: rfay
body: This is great, and thanks for maintaining on behalf of the community @sreichel 

I do happen to note how outdated this is:
> Latest Message: UPS APIs will stop working on 3rd June 2024 (https://openmage.github.io/Web_Notifications//2024/03/17/Ups.html)

@rpkoller you confirm that the Magento2 stuff is the same and doing fine right?
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-19T19:36:47Z
user: login: sreichel
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-20T00:38:02Z
user: login: rfay
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-20T13:46:24Z
user: login: sreichel
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-25T04:35:21Z

Review comments:
diff_hunk: @@ -766,6 +794,33 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+Clone a Git repository.
+
+=== "Git Clone"
+
+    ```bash
+    git clone <my-openamge-repo> my-openamge-site
+    cd my-openamge-site
+    ddev config --project-type=magento --php-version=8.1
+    ddev start
+    ddev composer install
+    # Install openmage and optionally install sample data
+    ddev openmage-install -q
path: docs/content/users/quickstart.md
user: login: rpkoller
body: the bats test is installing the sample data while the quickstart is omitting the sample data. i would add the -s flag on the quickstart as well 
created_at: 2025-03-17T02:35:09Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,62 @@
+#!/usr/bin/env bats
+
+setup() {
+  PROJNAME=magento-lts
+  load 'common-setup'
+  _common_setup
+}
+
+# executed after each test
+teardown() {
+  _common_teardown
+}
+
+@test "OpenMage git based quickstart with $(ddev --version)" {
+  # PROJECT_GIT_URL=https://github.com/OpenMage/magento-lts
+  PROJECT_GIT_URL=https://github.com/OpenMage/magento-lts
+
+  # git clone ${PROJECT_GIT_URL} ${PROJNAME}
+  run git clone ${PROJECT_GIT_URL} ${PROJNAME}
+  assert_success
+
+  # cd magento-lts
+  cd ${PROJNAME} || exit 2
+  assert_success
+
+  # ddev config --project-type=magento --php-version=8.1 --webserver-type=nginx-fpm
+  run ddev config --project-type=magento --php-version=8.1 --webserver-type=nginx-fpm
+  assert_success
+
+  # ddev start -y
+  run ddev start -y
+  assert_success
+
+  # ddev composer install
+  run ddev composer install
+  assert_success
+
+  # ddev launch
+  run bash -c "DDEV_DEBUG=true ddev launch"
+  assert_output "FULLURL https://${PROJNAME}.ddev.site"
+  assert_success
+
+  # Install openmage and optionally install sample data
+  ddev openmage-install -s -q
path: docs/tests/openmage.bats
user: login: rpkoller
body: i would move the openmage-install up right after the composer install (right after line 37). so that first everything is being installed and set up and then the assertions for launch and the curl commands is the next in line. and would there be a way to test if the sample data was installed successfully?  
created_at: 2025-03-17T02:36:59Z
author_association: COLLABORATOR
diff_hunk: @@ -766,6 +794,33 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+Clone a Git repository.
+
+=== "Git Clone"
+
+    ```bash
+    git clone <my-openamge-repo> my-openamge-site
path: docs/content/users/quickstart.md
user: login: rpkoller
body: a quickstart should be actionable. that way a user would have to search for the git repo to use (that is something that me as a user get really annoyed if i try to test something new - if something is unclear and i have search i get uncertain and discouraged - the clearer and more actionable the better imho). i would suggest to use `https://github.com/OpenMage/magento-lts`the repo that is used in the bats test
created_at: 2025-03-17T02:40:00Z
author_association: COLLABORATOR
diff_hunk: @@ -766,6 +794,33 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+Clone a Git repository.
+
+=== "Git Clone"
+
+    ```bash
+    git clone <my-openamge-repo> my-openamge-site
+    cd my-openamge-site
+    ddev config --project-type=magento --php-version=8.1
+    ddev start
+    ddev composer install
+    # Install openmage and optionally install sample data
+    ddev openmage-install -q
+    ```
+
+Your OpenMage project is now ready.
+The admin page can be found at `/admin`, log into the default admin account using `admin` and `veryl0ngpassw0rd`.
+
+To open the admin login page from CLI, run `ddev launch /admin`.
path: docs/content/users/quickstart.md
user: login: rpkoller
body: ```suggestion
To open the login page of the admin interface, enter `ddev launch /admin` in the terminal. Use `admin` as the username and `veryl0ngpassw0rd` as the password.
```

I would combine the two sentence. how about something like the following? 
created_at: 2025-03-17T02:48:21Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,62 @@
+#!/usr/bin/env bats
+
+setup() {
+  PROJNAME=magento-lts
+  load 'common-setup'
+  _common_setup
+}
+
+# executed after each test
+teardown() {
+  _common_teardown
+}
+
+@test "OpenMage git based quickstart with $(ddev --version)" {
+  # PROJECT_GIT_URL=https://github.com/OpenMage/magento-lts
+  PROJECT_GIT_URL=https://github.com/OpenMage/magento-lts
+
+  # git clone ${PROJECT_GIT_URL} ${PROJNAME}
+  run git clone ${PROJECT_GIT_URL} ${PROJNAME}
path: docs/tests/openmage.bats
user: login: rpkoller
body: ```suggestion
  run git clone --depth=1 ${PROJECT_GIT_URL} ${PROJNAME}
```
to reduce the bandwidth for github only download a shallow clone for the test (none of the branches nor the entire history of the codebase is needed for the bats test - something i've just added to the bats test for expression engine today. there the size of the git repo was even bigger and that made me think) 
created_at: 2025-03-17T02:51:47Z
author_association: COLLABORATOR
diff_hunk: @@ -587,11 +587,12 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 !!!tip "Add Vite support?"
     Since Laravel v9.19, Vite is included as the default [asset bundler](https://laravel.com/docs/vite). There are small tweaks needed in order to use it: [Working with Vite in DDEV - Laravel](https://ddev.com/blog/working-with-vite-in-ddev/#laravel).
 
-## Magento
+## Magento 2
path: docs/content/users/quickstart.md
user: login: rpkoller
body: in the magento2 quickstart seems something broken (see https://ddev--7091.org.readthedocs.build/en/7091/users/quickstart/#magento-2 )
![Screenshot 2025-03-17 at 03 54 13](https://github.com/user-attachments/assets/b44aa3aa-53a1-467b-af16-e7ca8b5e7732)

created_at: 2025-03-17T02:56:16Z
author_association: COLLABORATOR
diff_hunk: @@ -766,6 +794,33 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+Clone a Git repository.
+
+=== "Git Clone"
+
+    ```bash
+    git clone <my-openamge-repo> my-openamge-site
+    cd my-openamge-site
+    ddev config --project-type=magento --php-version=8.1
+    ddev start
+    ddev composer install
+    # Install openmage and optionally install sample data
+    ddev openmage-install -q
+    ```
+
+Your OpenMage project is now ready.
+The admin page can be found at `/admin`, log into the default admin account using `admin` and `veryl0ngpassw0rd`.
+
+To open the admin login page from CLI, run `ddev launch /admin`.
+
+Note that OpenMage itself provides several custom DDEV commands, including
+`openmage-install`, `openmage-admin`, `phpmd`, `rector`, `phpcbf`, `phpstan`, `vendor-patches`,
+and `php-cs-fixer`.
+
+Visit the [documentation](https://docs.openmage.org) for more information.
path: docs/content/users/quickstart.md
user: login: rpkoller
body: in other quickstart the phrase  "Read more about..." is used... for Craft for example "Read more about installing Craft in the [official documentation](https://craftcms.com/docs)." for Drupal for example "Read more about: [Drupal CMS](https://new.drupal.org/drupal-cms) & [Documentation](https://new.drupal.org/docs/drupal-cms)"
created_at: 2025-03-17T02:59:46Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,62 @@
+#!/usr/bin/env bats
+
+setup() {
+  PROJNAME=magento-lts
+  load 'common-setup'
+  _common_setup
+}
+
+# executed after each test
+teardown() {
+  _common_teardown
+}
+
+@test "OpenMage git based quickstart with $(ddev --version)" {
+  # PROJECT_GIT_URL=https://github.com/OpenMage/magento-lts
+  PROJECT_GIT_URL=https://github.com/OpenMage/magento-lts
+
+  # git clone ${PROJECT_GIT_URL} ${PROJNAME}
+  run git clone ${PROJECT_GIT_URL} ${PROJNAME}
+  assert_success
+
+  # cd magento-lts
+  cd ${PROJNAME} || exit 2
+  assert_success
+
+  # ddev config --project-type=magento --php-version=8.1 --webserver-type=nginx-fpm
+  run ddev config --project-type=magento --php-version=8.1 --webserver-type=nginx-fpm
+  assert_success
+
+  # ddev start -y
+  run ddev start -y
+  assert_success
+
+  # ddev composer install
+  run ddev composer install
+  assert_success
+
+  # ddev launch
+  run bash -c "DDEV_DEBUG=true ddev launch"
+  assert_output "FULLURL https://${PROJNAME}.ddev.site"
+  assert_success
+
+  # Install openmage and optionally install sample data
+  ddev openmage-install -s -q
path: docs/tests/openmage.bats
user: login: sreichel
body: Thanks. :+1: 
created_at: 2025-03-17T03:29:59Z
author_association: CONTRIBUTOR
diff_hunk: @@ -766,6 +794,33 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+Clone a Git repository.
+
+=== "Git Clone"
+
+    ```bash
+    git clone <my-openamge-repo> my-openamge-site
+    cd my-openamge-site
+    ddev config --project-type=magento --php-version=8.1
+    ddev start
+    ddev composer install
+    # Install openmage and optionally install sample data
+    ddev openmage-install -q
+    ```
+
+Your OpenMage project is now ready.
+The admin page can be found at `/admin`, log into the default admin account using `admin` and `veryl0ngpassw0rd`.
+
+To open the admin login page from CLI, run `ddev launch /admin`.
+
+Note that OpenMage itself provides several custom DDEV commands, including
+`openmage-install`, `openmage-admin`, `phpmd`, `rector`, `phpcbf`, `phpstan`, `vendor-patches`,
+and `php-cs-fixer`.
+
+Visit the [documentation](https://docs.openmage.org) for more information.
path: docs/content/users/quickstart.md
user: login: sreichel
body: I took it from Silverstripe CMS :)
created_at: 2025-03-17T03:39:34Z
author_association: CONTRIBUTOR
diff_hunk: @@ -587,11 +587,12 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 !!!tip "Add Vite support?"
     Since Laravel v9.19, Vite is included as the default [asset bundler](https://laravel.com/docs/vite). There are small tweaks needed in order to use it: [Working with Vite in DDEV - Laravel](https://ddev.com/blog/working-with-vite-in-ddev/#laravel).
 
-## Magento
+## Magento 2
path: docs/content/users/quickstart.md
user: login: rpkoller
body: i went to your repo and downloaded the zip file for the openmage branch so i am able to take a look in vscode. loooks like an indentation problem overall... line 594 with the tip title should not be indented only the content within that box (until line 619)... so removing one tab/ four spaces for line 594 to 619... or stricly speaking simply remove the one tab/four space from 594 to 663.
created_at: 2025-03-17T15:35:32Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,54 @@
+#!/usr/bin/env bats
+
+setup() {
+  PROJNAME=my-openmage-site
+  load 'common-setup'
+  _common_setup
+}
+
+# executed after each test
+teardown() {
+  _common_teardown
+}
+
+@test "OpenMage git based quickstart with $(ddev --version)" {
+  run mkdir ${PROJNAME} && cd ${PROJNAME}
+  assert_success
+
+  run git clone --depth=1 https://github.com/OpenMage/magento-lts .
+  assert_success
+
+  run ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
+  assert_success
+
+  run ddev start -y
+  assert_success
+
+  run ddev composer install
+  assert_success
+
+  # Silent OpenMage install with sample data
+  ddev openmage-install -q
path: docs/tests/openmage.bats
user: login: rpkoller
body: ```suggestion
  run ddev openmage-install -q
```
missing the run command prefix otherwise the following assert would be obsolete. when i first tried without the run command the bats test ran indefinitely. not sure if that was the cause or something else. but after adding the test is passing. 
created_at: 2025-03-19T12:32:35Z
author_association: COLLABORATOR
diff_hunk: @@ -769,6 +750,29 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+=== "Git Clone"
+
+    ```bash
+    mkdir my-openmage-site && cd my-openmage-site
+    git clone https://github.com/OpenMage/magento-lts .
+    ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
+    ddev start
+    ddev composer install
+    # Silent OpenMage install with sample data
+    # See `ddev openmage-install -h` for more options
+    ddev openmage-install -q
path: docs/content/users/quickstart.md
user: login: rpkoller
body: when manually testing the latest state i've noticed something i'Ve missed before (not sure if it was already there but if you look at the output of the command 

```
$> ddev openmage-install -q
Enable maintenance mode...
ERROR 1045 (28000): Access denied for user 'db'@'172.19.0.2' (using password: YES)
Creating Sample Data directory...
Downloading Sample Data...
--2025-03-19 13:27:01--  https://github.com/Vinai/compressed-magento-sample-data/raw/master/compressed-magento-sample-data-1.9.2.4.tgz
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/Vinai/compressed-magento-sample-data/master/compressed-magento-sample-data-1.9.2.4.tgz [following]
--2025-03-19 13:27:01--  https://raw.githubusercontent.com/Vinai/compressed-magento-sample-data/master/compressed-magento-sample-data-1.9.2.4.tgz
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 68614817 (65M) [application/octet-stream]
Saving to: ‘sample_data.tgz’

sample_data.tgz                 100%[======================================================>]  65.44M  2.55MB/s    in 26s     

2025-03-19 13:27:27 (2.54 MB/s) - ‘sample_data.tgz’ saved [68614817/68614817]

Uncompressing Sample Data...
Copying Sample Data into the OpenMage directory...
Clearing var/cache...
Importing Sample Data into the database...
ERROR 1045 (28000): Access denied for user 'db'@'172.19.0.2' (using password: YES)
Removing sample data...
SUCCESS: 71c2935475b8419becde5876a190b5b7
Disable maintenance mode...
```

it looks like the import into the db fails? 
created_at: 2025-03-19T12:34:40Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,54 @@
+#!/usr/bin/env bats
+
+setup() {
+  PROJNAME=my-openmage-site
+  load 'common-setup'
+  _common_setup
+}
+
+# executed after each test
+teardown() {
+  _common_teardown
+}
+
+@test "OpenMage git based quickstart with $(ddev --version)" {
+  run mkdir ${PROJNAME} && cd ${PROJNAME}
+  assert_success
+
+  run git clone --depth=1 https://github.com/OpenMage/magento-lts .
+  assert_success
+
+  run ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
+  assert_success
+
+  run ddev start -y
+  assert_success
+
+  run ddev composer install
+  assert_success
+
+  # Silent OpenMage install with sample data
+  ddev openmage-install -q
path: docs/tests/openmage.bats
user: login: stasadev
body: Thanks!
created_at: 2025-03-19T13:11:10Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,54 @@
+#!/usr/bin/env bats
+
+setup() {
+  PROJNAME=my-openmage-site
+  load 'common-setup'
+  _common_setup
+}
+
+# executed after each test
+teardown() {
+  _common_teardown
+}
+
+@test "OpenMage git based quickstart with $(ddev --version)" {
+  run mkdir ${PROJNAME} && cd ${PROJNAME}
+  assert_success
+
+  run git clone --depth=1 https://github.com/OpenMage/magento-lts .
+  assert_success
+
+  run ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
+  assert_success
+
+  run ddev start -y
+  assert_success
+
+  run ddev composer install
+  assert_success
+
+  # Silent OpenMage install with sample data
+  ddev openmage-install -q
path: docs/tests/openmage.bats
user: login: stasadev
body: Thanks!
created_at: 2025-03-19T13:12:39Z
author_association: MEMBER
diff_hunk: @@ -769,6 +750,29 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+=== "Git Clone"
+
+    ```bash
+    mkdir my-openmage-site && cd my-openmage-site
+    git clone https://github.com/OpenMage/magento-lts .
+    ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
+    ddev start
+    ddev composer install
+    # Silent OpenMage install with sample data
+    # See `ddev openmage-install -h` for more options
+    ddev openmage-install -q
path: docs/content/users/quickstart.md
user: login: stasadev
body: I see this too, thank you, I'll investigate.
created_at: 2025-03-19T13:17:50Z
author_association: MEMBER
diff_hunk: @@ -769,6 +750,29 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+=== "Git Clone"
+
+    ```bash
+    mkdir my-openmage-site && cd my-openmage-site
+    git clone https://github.com/OpenMage/magento-lts .
+    ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
+    ddev start
+    ddev composer install
+    # Silent OpenMage install with sample data
+    # See `ddev openmage-install -h` for more options
+    ddev openmage-install -q
path: docs/content/users/quickstart.md
user: login: sreichel
body: It happened to me too, but i thought i've missed to config something.
created_at: 2025-03-19T13:23:52Z
author_association: CONTRIBUTOR
diff_hunk: @@ -769,6 +750,29 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+=== "Git Clone"
+
+    ```bash
+    mkdir my-openmage-site && cd my-openmage-site
+    git clone https://github.com/OpenMage/magento-lts .
+    ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
+    ddev start
+    ddev composer install
+    # Silent OpenMage install with sample data
+    # See `ddev openmage-install -h` for more options
+    ddev openmage-install -q
path: docs/content/users/quickstart.md
user: login: stasadev
body: The fix is available in:

- https://github.com/OpenMage/magento-lts/pull/4720
created_at: 2025-03-19T13:40:11Z
author_association: MEMBER
diff_hunk: @@ -769,6 +750,29 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+=== "Git Clone"
+
+    ```bash
+    mkdir my-openmage-site && cd my-openmage-site
+    git clone https://github.com/OpenMage/magento-lts .
path: docs/content/users/quickstart.md
user: login: rfay
body: This does no harm, but wouldn't it be simpler to do this? Wouldn't people understand it ok?

```suggestion
    git clone https://github.com/OpenMage/magento-lts my-openmage-site
```
created_at: 2025-03-19T19:19:42Z
author_association: MEMBER
diff_hunk: @@ -769,6 +750,29 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+=== "Git Clone"
+
+    ```bash
+    mkdir my-openmage-site && cd my-openmage-site
+    git clone https://github.com/OpenMage/magento-lts .
+    ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
path: docs/content/users/quickstart.md
user: login: rfay
body: Why are we using an old version of PHP here? I do see that suggestion in https://docs.openmage.org/users/requirements/ but am surprised that they'd be that far back. DDEV's default is currently 8.3, and will change to 8.4 in the fall. If this is OK and recommended, it's OK, but I was wondering if maybe the OpenMage doc was out of date.
created_at: 2025-03-19T19:24:31Z
author_association: MEMBER
diff_hunk: @@ -769,6 +750,29 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+=== "Git Clone"
+
+    ```bash
+    mkdir my-openmage-site && cd my-openmage-site
+    git clone https://github.com/OpenMage/magento-lts .
+    ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
path: docs/content/users/quickstart.md
user: login: sreichel
body: Thanks. DOCS are not up 2 date. Current OM release supports php74, but with next release we require php81

https://github.com/OpenMage/magento-lts/pull/4124 (not released yet)

Moving to php83 was planned for upcoming releases. 
created_at: 2025-03-20T00:38:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -769,6 +750,29 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+=== "Git Clone"
+
+    ```bash
+    mkdir my-openmage-site && cd my-openmage-site
+    git clone https://github.com/OpenMage/magento-lts .
+    ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
path: docs/content/users/quickstart.md
user: login: rfay
body: Thanks, I know you'll update when it supports current stable. 
created_at: 2025-03-20T13:46:24Z
author_association: MEMBER
diff_hunk: @@ -769,6 +750,29 @@ The Laravel project type can be used for [StarterKits](https://laravel.com/docs/
 
     The [`server.js`](https://github.com/ddev/test-nodejs/blob/main/server.js) used here is a trivial Express-based Node.js webserver. Yours will be more extensive.
 
+## OpenMage
+
+=== "Git Clone"
+
+    ```bash
+    mkdir my-openmage-site && cd my-openmage-site
+    git clone https://github.com/OpenMage/magento-lts .
+    ddev config --project-type=magento --php-version=8.1 --web-environment-add=MAGE_IS_DEVELOPER_MODE=1
+    ddev start
+    ddev composer install
+    # Silent OpenMage install with sample data
+    # See `ddev openmage-install -h` for more options
+    ddev openmage-install -q
path: docs/content/users/quickstart.md
user: login: sreichel
body: @stasadev "it happened to me" [here ](https://github.com/sreichel/magento-lts/actions/runs/14051400798/job/39342331527) ... playing around with cypress add-on. Now it works.

Love DDEV :heart: 

Thanks @rfay @rpkoller @stasadev @tyler36 
created_at: 2025-03-25T04:35:21Z
author_association: CONTRIBUTOR

PR comments:
user: login: sreichel
created_at: 2025-03-15T02:42:10Z
body: Thanks for your reply.

This PR is on a very early stage. It does not work locally for some reason, so i have to do it in small chunks. 

However ...

> the goal of those bats tests is to mirror the corresponding quickstart and make sure to notice anything breaking early on by running those regular tests, but the bats test you've created uses another approach (git clone based) than the quickstart https://ddev.readthedocs.io/en/stable/users/quickstart/#magento-openmagemagento-1 (zip archive downloaded by curl).

I was not really aware of that documentation. OpenMage offered downloading zip-archive until some months ago, but it never was recommended. OM [supports ](https://docs.openmage.org/users/install/) "git clone" for devs and "composer" install.

For now i thinks its enough to test "git clone" install. Custom commands like `openmage-install` are not present for compser install at the moment. (yeah, needs to be fixed). So i'd recommend to update quickstart-docs - and replace zip-download part.

Thanks again for your suggestions, as soon it works locally .... :)


author_association: CONTRIBUTOR
user: login: rpkoller
created_at: 2025-03-15T15:25:36Z
body: yeah i was well aware that your PR is still in draft status and a work in progress, the reason i've already commented on was  when i saw that your test was using a different approach than the existing quickstart, and i just wanted to give you a headsup about the fundamental approach to keep the test as close as possible to the quickstart. 

i agree based on the docs it might be a good thing to drop the zip based quickstart approach for openmage and the git based approach seems like the right pick at this point. the composer instructions are not actionable easily it looks like. 


author_association: COLLABORATOR
user: login: sreichel
created_at: 2025-03-15T22:10:43Z
body: Thanks. I did not knew that the tests are tied to quickstart guides. That makes sense, of course :)

Update docs in https://github.com/ddev/ddev/pull/7093 first.
author_association: CONTRIBUTOR
user: login: rfay
created_at: 2025-03-16T15:00:37Z
body: This needs a rebase after magento2 changes, thanks.
author_association: MEMBER
user: login: sreichel
created_at: 2025-03-16T16:40:54Z
body: Ping @kiatng
author_association: CONTRIBUTOR
user: login: sreichel
created_at: 2025-03-17T00:17:29Z
body: @rpkoller pls let me know for improvements.. Thanks :)
author_association: CONTRIBUTOR
user: login: sreichel
created_at: 2025-03-17T05:47:32Z
body: > puzzled cuz i thought magento2 and openmage are just two different major versions of magento but on closer look they are not.

They are definitely not. OpenMage is M2's successor 😀

Thanks for review, I'll fix everything else later. 
author_association: CONTRIBUTOR
user: login: rfay
created_at: 2025-03-17T23:27:41Z
body: Rebased, thanks for your work on this! We had a bunch of quickstart edits go in and wanted to make sure this was updated after that.
author_association: MEMBER
user: login: rpkoller
created_at: 2025-03-18T03:10:56Z
body: the failing expression engine test should now be fixed as well 
author_association: COLLABORATOR
user: login: rfay
created_at: 2025-03-18T19:37:54Z
body: Rebased again
author_association: MEMBER
user: login: rpkoller
created_at: 2025-03-19T16:53:57Z
body: this PR looks good to go now. the only detail i wonder how should the openmage-install issue be handled? the upstream fix got already approved but question is when it would get into a release? should the openmage-install line be removed from the quickstart for now?  in the test it does not really any harm. the test passes since it is only tested if the command runs through not the actual result. or should the PR simply go in as is now with the openmage-install on the quickstart? either way it would be an improvement compared to the current state. personally i would lean towards commit it in the current state. 
author_association: COLLABORATOR
user: login: rpkoller
created_at: 2025-03-19T16:54:30Z
body: oh lol just noticed the upstream fix got already committed ^^
author_association: COLLABORATOR
user: login: sreichel
created_at: 2025-03-19T16:59:53Z
body: > but question is when it would get into a release?

I think it will take a month till next release.
author_association: CONTRIBUTOR