From 0d4f094ab0473ff48662f7980773335fda701cb4 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Mon, 15 Jun 2026 10:19:29 +0530 Subject: [PATCH] fix(php): remove stale PHP version fallbacks 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. --- src/PHP.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/PHP.php b/src/PHP.php index 13712f5..1e4746e 100644 --- a/src/PHP.php +++ b/src/PHP.php @@ -198,7 +198,7 @@ public function create( $args, $assoc_args ) { $this->site_data['site_fs_path'] = WEBROOT . $this->site_data['site_url']; $this->cache_type = \EE\Utils\get_flag_value( $assoc_args, 'cache' ); $this->site_data['site_ssl_wildcard'] = \EE\Utils\get_flag_value( $assoc_args, 'wildcard' ); - $this->site_data['php_version'] = \EE\Utils\get_flag_value( $assoc_args, 'php', 'latest' ); + $this->site_data['php_version'] = \EE\Utils\get_flag_value( $assoc_args, 'php' ); $this->site_data['app_sub_type'] = 'php'; $this->site_data['site_container_fs_path'] = get_public_dir( $assoc_args ); @@ -248,8 +248,6 @@ public function create( $args, $assoc_args ) { \EE::confirm( sprintf( 'EEv4 does not support PHP %s. Continue with PHP %s?', $old_version, $this->site_data['php_version'] ) ); } - $this->site_data['php_version'] = ( 8.0 === (double) $this->site_data['php_version'] ) ? 'latest' : $this->site_data['php_version']; - if ( $this->cache_type && ! $local_cache ) { \EE\Service\Utils\init_global_container( GLOBAL_REDIS ); }