Skip to content

Generalize product metapackage detection for alternate metapackages#196

Merged
mage-os-ci merged 3 commits intomage-os:release/3.xfrom
rhoerr:claude/generalize-product-metadata-YIO0T
Feb 18, 2026
Merged

Generalize product metapackage detection for alternate metapackages#196
mage-os-ci merged 3 commits intomage-os:release/3.xfrom
rhoerr:claude/generalize-product-metadata-YIO0T

Conversation

@rhoerr
Copy link
Copy Markdown
Contributor

@rhoerr rhoerr commented Jan 30, 2026

The system package detection was previously hardcoded to only recognize packages matching mage-os/product-*-edition. This change generalizes the regex to match any mage-os/product-* package, enabling support for alternate product metapackages like mage-os/product-minimal.

  • Update isSystemPackage() regex to match any mage-os/product-* package
  • Update getRequiredPhpVersion() to use isSystemPackage() instead of hardcoded product-community-edition
  • Add unit tests for isSystemPackage() with various package patterns
  • Update ProductMetadataTest to use proper mage-os package names

Description (*)

Improves flexibility of product version loading for different product package names

Related Pull Requests

#115

Fixed Issues (if relevant)

  1. Fixes mage-os/mageos-magento2#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

rhoerr and others added 3 commits January 10, 2026 21:31
* Expand allowed versions of MySQL/MariaDB

* Update MySQL version compatibility range to include 8.x up to 8.4
…so frontend area cache picks up compiled files instead of regenerating on the first request by @jakwinkler (mage-os#194)

Co-authored-by: Jakub Winkler <jwinkler@qoliber.com>
The system package detection was previously hardcoded to only recognize
packages matching `mage-os/product-*-edition`. This change generalizes
the regex to match any `mage-os/product-*` package, enabling support for
alternate product metapackages like `mage-os/product-minimal`.

- Update isSystemPackage() regex to match any mage-os/product-* package
- Update getRequiredPhpVersion() to use isSystemPackage() instead of
  hardcoded package name
- Add unit tests for isSystemPackage() with various package patterns
- Update ProductMetadataTest to use proper mage-os package names

https://claude.ai/code/session_01KVLKuTyatjiMtYp2npbqgc
@rhoerr rhoerr marked this pull request as ready for review January 31, 2026 03:38
@rhoerr rhoerr requested a review from a team as a code owner January 31, 2026 03:38
@rhoerr
Copy link
Copy Markdown
Contributor Author

rhoerr commented Jan 31, 2026

Tested, this works. I'm going to fix the fundamental issue by renaming mage-os/product-minimal to mage-os/product-minimal-edition, but it'll still be best to loosen the pattern and remove the hardcoded product-community-edition.

@rhoerr rhoerr changed the base branch from main to release/3.x January 31, 2026 03:43
Copy link
Copy Markdown

@marcelmtz marcelmtz left a comment

Choose a reason for hiding this comment

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

Seems that the integration test needs to get fixed, could be that we need to change the sort order of the constants in https://github.com/mage-os/mageos-magento2/blob/release/3.x/dev/tests/integration/testsuite/Magento/Framework/Interception/PluginListGeneratorTest.php
Something like (not tested, just throwing ideas):
const CACHE_ID_FRONTEND = 'frontend|global|primary|plugin-list'; const CACHE_ID_DUMMY = 'dummy|global|primary|plugin-list';

@rhoerr
Copy link
Copy Markdown
Contributor Author

rhoerr commented Feb 12, 2026

Seems that the integration test needs to get fixed, could be that we need to change the sort order of the constants in https://github.com/mage-os/mageos-magento2/blob/release/3.x/dev/tests/integration/testsuite/Magento/Framework/Interception/PluginListGeneratorTest.php Something like (not tested, just throwing ideas): const CACHE_ID_FRONTEND = 'frontend|global|primary|plugin-list'; const CACHE_ID_DUMMY = 'dummy|global|primary|plugin-list';

Thanks, good spot. That came from another recent PR #194 -- the test does need to be fixed to match the corrected behavior so we pass again. Functionally it's fine.

Copy link
Copy Markdown

@marcelmtz marcelmtz left a comment

Choose a reason for hiding this comment

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

The integration test will get tackled separately, approved (as it comes from other pr)

@rhoerr
Copy link
Copy Markdown
Contributor Author

rhoerr commented Feb 12, 2026

Thanks! We need to get you added to the review groups in Terraform so that actually counts. 😄

@mage-os-ci mage-os-ci merged commit 62ae6fe into mage-os:release/3.x Feb 18, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants