Skip to content

[BUG] check-store can break when PHP version doesn't match supported-versions pin #301

Description

@rhoerr

Problem

supported-version returns php: 8.4 for Mage-OS 2.2.2 (same for Magento 2.4.8). For a store on PHP 8.3 with packages not yet 8.4-compatible, the CI composer install fails — even though the store builds and runs fine on 8.3 on its actual server.

2.2.2 / 2.4.8 technically support 8.3, but the matrix only emits the latest supported PHP (8.4) with no way to pin lower.

The same problem can occur for any instance where a store's software dependencies differ from the supported-versions matrix's pinned versions for the given release. Since all Magento + Mage-OS releases support multiple versions of PHP, SQL, ES, etc, and especially since composer packages are often pinned to specific PHP versions, this is liable to come up a lot.

Repro

  • Store: Mage-OS 2.2.2 on PHP 8.3 with addon reessolutions/db-override
  • supported-version@v8.5.0 → matrix php: 8.4
  • composer install on PHP 8.4.22 fails:
- reessolutions/db-override 1.1.0 requires php ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 -> your php version (8.4.22) does not satisfy that requirement.

Setting config.platform.php: 8.3 in composer.json might clear the install error, but then 8.3-targeted code runs on the 8.4 CI runtime. Not a real fix.

Relevant: https://github.com/graycoreio/github-actions-magento2/blob/main/supported-version/src/versions/mage-os/individual.json#L245

Proposed options

  1. Expand php to an array so multiple supported versions can be tested. Downside: backwards-incompatible for existing consumers; would expand the testing matrix.
  2. Allow config.platform.php to override the matrix defaults on a per-site basis.

In discussing with Damien, we lean toward some variation of (2).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions