fix: lower the PHP floor back to 8.1 - #207
Open
e0ipso wants to merge 1 commit into
Open
Conversation
4.0.0 raised `php` from `>=8.1` to `>=8.3`. Nothing in the library needs it:
the newest syntax used is `readonly` promoted properties, which is PHP 8.1,
and there are no enums or 8.2/8.3-only constructs.
The floor has a cost that is easy to miss. Composer resolves a too-high
transitive PHP constraint by selecting an older version of whatever depends on
the package, rather than reporting a platform problem. So a Drupal 10 site on
PHP 8.1 or 8.2 asking for drupal/media_mpx quietly receives a 2023 release
with nothing explaining why -- the symptom is "my dependency did not update",
with no error to search for.
CI only ever ran PHP 8.3, which is how a floor nothing required went
unnoticed. It now runs the floor as well:
* build_php81 -- lowest PHP with `--prefer-lowest`, which resolves Symfony 6
since Symfony 7 requires PHP 8.2
* build_php82 -- fills the gap to the existing 8.3 job
* build_php83 -- unchanged, keeps coverage
Verified `--prefer-lowest` resolution at PHP 8.1, 8.2 and 8.3 via
config.platform.php: doctrine/annotations 1.12.0, symfony/serializer 6.0.0 and
PHPUnit 9.6.33 in every case. The suite passes and php-cs-fixer reports no
changes on 8.3; the new jobs are what will prove 8.1 and 8.2 at runtime.
Member
|
@e0ipso Given that PHP 8.1 doesn't get security updates anymore, it seems like it would be reasonable to support 8.2 but not 8.1? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
4.0.0 raised
phpfrom>=8.1to>=8.3. Nothing here needs it: the newest syntax in the library isreadonlypromoted properties (PHP 8.1), with no enums and no 8.2/8.3-only constructs.Why it matters more than a version bump usually would
Composer resolves a too-high transitive PHP constraint by selecting an older version of whatever depends on the package, rather than reporting a platform problem. This floor therefore reaches consumers as a silent downgrade:
composer require drupal/media_mpxgivesmpx-php 3.1.4— an older media_mpx releasempx-php 3.1.4— an older media_mpx releasempx-php 4.2.0— currentThe symptom a user sees is "my dependency did not update", with no error message to search for.
drupal/media_mpxsupportsdrupal/core: ^10 || ^11, and Drupal 10's own floor is 8.1, so this cuts off a supported configuration.Changes
php: >=8.1.build_php81— lowest PHP with--prefer-lowest, which resolves Symfony 6 (Symfony 7 needs PHP 8.2)build_php82— fills the gap to the existing 8.3 jobbuild_php83— unchanged, keeps the coverage jobVerification
--prefer-lowestresolution at each PHP version viaconfig.platform.php:Suite passes and php-cs-fixer reports no changes on 8.3, which is the only runtime I have locally — the new 8.1 and 8.2 jobs are what actually prove those.
Pairs with Lullabot/drupal-symfony-lock#9, which does the same thing there. Both are needed for a Drupal 10 site below PHP 8.3 to resolve the current media_mpx.