Skip to content

Commit

Permalink
Merge pull request #225 from mrrobot47/scrape/latest
Browse files Browse the repository at this point in the history
Scrape latest in php version entry
  • Loading branch information
mrrobot47 committed May 13, 2024
2 parents cbaf2ab + d158945 commit bd2d589
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/WordPress.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function __construct() {
* [--php=<php-version>]
* : 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.
* ---
* default: latest
* default: 8.2
* options:
* - 5.6
* - 7.0
Expand Down Expand Up @@ -303,7 +303,7 @@ public function create( $args, $assoc_args ) {
$this->cache_type = \EE\Utils\get_flag_value( $assoc_args, 'cache' );
$wildcard_flag = \EE\Utils\get_flag_value( $assoc_args, 'wildcard' );
$this->site_data['site_ssl_wildcard'] = 'subdom' === $this->site_data['app_sub_type'] || $wildcard_flag ? true : false;
$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', '8.2' );
$this->site_data['app_admin_url'] = \EE\Utils\get_flag_value( $assoc_args, 'title', $this->site_data['site_url'] );
$this->site_data['app_admin_username'] = \EE\Utils\get_flag_value( $assoc_args, 'admin-user', \EE\Utils\random_name_generator() );
$this->site_data['app_admin_password'] = \EE\Utils\get_flag_value( $assoc_args, 'admin-pass', '' );
Expand Down Expand Up @@ -388,8 +388,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'] ), $assoc_args );
}

$this->site_data['php_version'] = ( 8.2 === (double) $this->site_data['php_version'] ) ? 'latest' : $this->site_data['php_version'];

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

0 comments on commit bd2d589

Please sign in to comment.