Repository navigation
test: add OpenMage/Magento 1 quickstart test and split it from Magento 2, for #7094 - #7091
Conversation
There was a problem hiding this comment.
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 -ywhich is the preferable way to start ddev, but the openmage quickstart needs to reflect that as well. would it be possible to add the -yto 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."
|
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 ...
I was not really aware of that documentation. OpenMage offered downloading zip-archive until some months ago, but it never was recommended. OM supports "git clone" for devs and "composer" install. For now i thinks its enough to test "git clone" install. Custom commands like Thanks again for your suggestions, as soon it works locally .... :) |
|
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. |
|
Thanks. I did not knew that the tests are tied to quickstart guides. That makes sense, of course :) Update docs in #7093 first. |
|
This needs a rebase after magento2 changes, thanks. |
|
Ping @kiatng |
|
@rpkoller pls let me know for improvements.. Thanks :) |
There was a problem hiding this comment.
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!
They are definitely not. OpenMage is M2's successor 😀 Thanks for review, I'll fix everything else later. |
|
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. |
|
the failing expression engine test should now be fixed as well |
|
Rebased again |
Co-authored-by: Ralf Koller <[email protected]>
rpkoller
left a comment
There was a problem hiding this comment.
overall it looks good and very close, thank you! i've only found two remaining details to note.
| ddev composer install | ||
| # Silent OpenMage install with sample data | ||
| # See `ddev openmage-install -h` for more options | ||
| ddev openmage-install -q |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
I see this too, thank you, I'll investigate.
There was a problem hiding this comment.
It happened to me too, but i thought i've missed to config something.
There was a problem hiding this comment.
The fix is available in:
Co-authored-by: Ralf Koller <[email protected]>
|
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. |
|
oh lol just noticed the upstream fix got already committed ^^ |
I think it will take a month till next release. |
rfay
left a comment
There was a problem hiding this comment.
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?
| mkdir my-openmage-site && cd my-openmage-site | ||
| git clone https://github.com/OpenMage/magento-lts . |
There was a problem hiding this comment.
This does no harm, but wouldn't it be simpler to do this? Wouldn't people understand it ok?
| mkdir my-openmage-site && cd my-openmage-site | |
| git clone https://github.com/OpenMage/magento-lts . | |
| git clone https://github.com/OpenMage/magento-lts my-openmage-site |
| ```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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Thanks. DOCS are not up 2 date. Current OM release supports php74, but with next release we require php81
OpenMage/magento-lts#4124 (not released yet)
Moving to php83 was planned for upcoming releases.
There was a problem hiding this comment.
Thanks, I know you'll update when it supports current stable.

The Issue
Rendered updated docs at: