Skip to content

Commit 38da882

Browse files
authored
Merge pull request #222 from L0RD-ZER0/feature/support-newer-php
Feature/support newer php
2 parents 7ee4b34 + 7cd72ef commit 38da882

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/Site_WP_Docker.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ public function generate_docker_compose_yml( array $filters = [], $volumes ) {
6464
$db['sysctls'] = sysctl_parameters();
6565
$db['networks'] = $network_default;
6666
}
67+
6768
// PHP configuration.
68-
$php_image_key = ( 'latest' === $filters['php_version'] ? 'easyengine/php' : 'easyengine/php' . $filters['php_version'] );
69+
$php_image_key = ( 'latest' === $filters['php_version'] ? 'easyengine/php8.2' : 'easyengine/php' . $filters['php_version'] );
6970

7071
$php['service_name'] = [ 'name' => 'php' ];
7172
$php['image'] = [ 'name' => $php_image_key . ':' . $img_versions[ $php_image_key ] ];

src/WordPress.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function __construct() {
131131
* : Set custom source directory for site inside htdocs.
132132
*
133133
* [--php=<php-version>]
134-
* : PHP version for site. Currently only supports PHP 5.6, 7.0, 7.2, 7.3, 7.4, 8.0, 8.1 and latest.
134+
* : PHP version for site. Currently only supports PHP 5.6, 7.0, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3 and latest.
135135
* ---
136136
* default: latest
137137
* options:
@@ -142,6 +142,8 @@ public function __construct() {
142142
* - 7.4
143143
* - 8.0
144144
* - 8.1
145+
* - 8.2
146+
* - 8.3
145147
* - latest
146148
* ---
147149
*
@@ -368,7 +370,7 @@ public function create( $args, $assoc_args ) {
368370
}
369371
$this->site_data['alias_domains'] = substr( $this->site_data['alias_domains'], 0, - 1 );
370372

371-
$supported_php_versions = [ 5.6, 7.0, 7.2, 7.3, 7.4, 8.0, 8.1, 'latest' ];
373+
$supported_php_versions = [ 5.6, 7.0, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 'latest' ];
372374
if ( ! in_array( $this->site_data['php_version'], $supported_php_versions ) ) {
373375
$old_version = $this->site_data['php_version'];
374376
$floor = (int) floor( $this->site_data['php_version'] );
@@ -386,7 +388,7 @@ public function create( $args, $assoc_args ) {
386388
\EE::confirm( sprintf( 'EEv4 does not support PHP %s. Continue with PHP %s?', $old_version, $this->site_data['php_version'] ), $assoc_args );
387389
}
388390

389-
$this->site_data['php_version'] = ( 7.4 === (double) $this->site_data['php_version'] ) ? 'latest' : $this->site_data['php_version'];
391+
$this->site_data['php_version'] = ( 8.2 === (double) $this->site_data['php_version'] ) ? 'latest' : $this->site_data['php_version'];
390392

391393
if ( \EE\Utils\get_flag_value( $assoc_args, 'local-db' ) ) {
392394
$this->site_data['db_host'] = 'db';

0 commit comments

Comments
 (0)