feat: add upstream version to metapackage composer.json for runtime use#189
Conversation
|
I have opened this as a draft PR, because I believe it will work as intended, but I have not been able to test and confirm that it actually does. I currently get an error on mageos-release, unrelated to these changes: I've tried various things including updating composer, reinstalling node packages, and updating node packages, but to no avail. This error appears to be the same affecting the upstream mirror builds: https://github.com/mage-os/generate-mirror-repo-js/actions/runs/12732736267/job/35488270194#step:8:331 Which makes me wonder if the entire build process is currently broken. |
|
I opened a separate issue for the build error. #190 |
|
Tested, made some fixes, works as intended now. With the new code, the metapackage includes the upstream version as |
|
Nice! should we merge and rebuild 1.0.5? or should we release a new one? |
|
It'll have to be part of the next release, because the addition will change checksums. |
|
@rhoerr is it safe to merge it now or do we have to wait for some other task? |
|
I believe it's safe to merge. It won't affect past releases because those are already built and tagged. |
This is the build-release portion of changes for mage-os/mageos-magento2#108
Some extensions use version comparison in Magento to determine what code to run. This is a problem for Mage-OS, where we replace Magento's
getVersion()number (IE 2.4.7) with the Mage-OS version (IE 1.0.5), causing old incompatible code to run.The idea here is:
magento/product-community-edition, via https://github.com/rhoerr/mageos-magento2/blob/7bed30c9ea2b6e31130d4cead3e191871fb9b98e/lib/internal/Magento/Framework/App/ProductMetadata.php#L118mage-os/product-community-editionmetapackage.composerConfig.extra.replaceVersionMap(package versions for the defined upstream release) formagento/product-community-edition, which contains the expected version number, EG 2.4.7-p3.composerConfig.extra.magento_version, so that Magento can load that from the lock file at runtime, the same way it gets the metapackage version now.