fix(php): remove stale PHP version fallbacks#111
Merged
Conversation
The default PHP version is already 8.4: EE injects the `--php` synopsis default into the args before `create()` runs, so the two leftovers from earlier defaults were dead or wrong: - The `'latest'` fallback in the `--php` flag lookup never executed, since the synopsis default is always set first. - The `8.0 === (double) ... ? 'latest'` remap dated back to when 8.0 was the latest image. With `latest` now resolving to php8.4, it silently rewrote an explicit `--php=8.0` request to the 8.4 image. Removing it ensures an explicitly requested version is always honoured. Brings PHP version handling in line with site-type-wp.
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.
Summary
Mirrors the PHP version cleanup done in
site-type-wp. The default is already PHP 8.4 here — PR #110 (php-fpm 8.5 support) correctly bumped the--phpsynopsisdefault:to8.4, and EE injects that into the args beforecreate()runs. This PR removes two leftovers from earlier defaults that were dead or actively wrong.Changes
1. Drop the dead
'latest'fallback (PHP.php:201)The synopsis
default: 8.4is always populated into$assoc_args['php']before the command runs, so the'latest'fallback never executed. It only served to confuse and drift from the real default — same dead code that was removed fromsite-type-wp.2. Remove the stale
8.0 → 'latest'remap (PHP.php:251)This dated back to when
8.0was the latest image. Withlatestnow resolving toeasyengine/php8.4, the remap silently rewrote an explicit--php=8.0request to'latest'→ the php8.4 image. Removing it ensures an explicitly requested version is always honoured.site-type-wpremoved its equivalent line in the "Scrape latest in php version entry" change; this repo never got that cleanup.Behaviour
--php)--php=latest--php=8.0No change for the default or
latest; the only behavioural difference is that--php=8.0is now honoured instead of being rewritten.