-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
PHP Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Problem
The root composer.json of every driver branch declares "php": ">=8.1,<9", which claims support for every PHP 8.x version. The branches do not all support the same versions:
| Branch | PHP versions tested by CI |
|---|---|
| v1.21 | 8.1 to 8.4 |
| v2.1 | 8.1 to 8.5 |
| v2.3, v2.4, v2.5 | 8.1 to 8.6 |
| v2.x | 8.1 to 8.6 |
Composer and PIE read this constraint from Packagist before attempting to build the extension, so they consider it installable on versions that its branch does not support. The failure then shows up as a compile error, not as an incompatibility.
Recent examples:
- 1.21.13 claims PHP 8.6 support but does not build there. See
PHPC-2805. - 2.2.0 and 2.3.0/2.3.1 use XtOffsetOf, removed in PHP 8.6, while their constraint claims 8.6 support.
Proposal
Set the upper bound of the php constraint on each maintained branch to the latest PHP version tested by its CI matrix, and bump it when a version is added to or removed from the matrix:
| Branch | Constraint |
|---|---|
| v1.21 | >=8.1,<8.5 |
| v2.1 | >=8.1,<8.6 |
| v2.3, v2.4, v2.5 | >=8.1,<8.7 |
| v2.x | Keep >=8.1,<9 for the development branch |
Keep the constraint and the CI matrix in sync. The same change is needed when a version is dropped, for example PHPC-2790.
Released tags cannot be modified, so the corrected constraint reaches users with the next patch release of each maintained branch.