diff --git a/src/PHP.php b/src/PHP.php index ddb326a..83d47c8 100644 --- a/src/PHP.php +++ b/src/PHP.php @@ -81,7 +81,7 @@ public function __construct() { * : Create separate db container instead of using global db. * * [--php=] - * : PHP version for site. Currently only supports PHP 5.6 and latest. + * : PHP version for site. Currently only supports PHP 5.6, 7.0, 7.2, 7.3, 7.4 and latest. * --- * default: latest * options: @@ -89,6 +89,7 @@ public function __construct() { * - 7.0 * - 7.2 * - 7.3 + * - 7.4 * - latest * --- * @@ -201,14 +202,14 @@ public function create( $args, $assoc_args ) { } } - $supported_php_versions = [ 5.6, 7.0, 7.2, 7.3, 'latest' ]; + $supported_php_versions = [ 5.6, 7.0, 7.2, 7.3, 7.4, 'latest' ]; if ( ! in_array( $this->site_data['php_version'], $supported_php_versions ) ) { $old_version = $this->site_data['php_version']; $floor = (int) floor( $this->site_data['php_version'] ); if ( 5 === $floor ) { $this->site_data['php_version'] = 5.6; } elseif ( 7 === $floor ) { - $this->site_data['php_version'] = 7.2; + $this->site_data['php_version'] = 7.3; $old_version .= ' yet'; } else { EE::error( 'Unsupported PHP version: ' . $this->site_data['php_version'] ); @@ -216,7 +217,7 @@ 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'] = ( 7.2 === (double) $this->site_data['php_version'] ) ? 'latest' : $this->site_data['php_version']; + $this->site_data['php_version'] = ( 7.3 === (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 ); @@ -378,12 +379,8 @@ private function configure_site_files() { $default_conf_content = $this->generate_default_conf( $this->cache_type, $server_name ); - $php_ini_data = [ - 'admin_email' => $this->site_data['app_admin_email'], - ]; - $env_content = \EE\Utils\mustache_render( SITE_PHP_TEMPLATE_ROOT . '/config/.env.mustache', $env_data ); - $php_ini_content = \EE\Utils\mustache_render( SITE_PHP_TEMPLATE_ROOT . '/config/php-fpm/php.ini.mustache', $php_ini_data ); + $php_ini_content = file_get_contents( SITE_WP_TEMPLATE_ROOT . '/config/php-fpm/php.ini.mustache' ); try { $this->dump_docker_compose_yml( [ 'nohttps' => true ] ); diff --git a/templates/config/php-fpm/php.ini.mustache b/templates/config/php-fpm/php.ini.mustache index 6a9d0a9..eb2436d 100644 --- a/templates/config/php-fpm/php.ini.mustache +++ b/templates/config/php-fpm/php.ini.mustache @@ -4,4 +4,4 @@ upload_max_filesize = 100M post_max_size = 100M [mail function] -sendmail_path = /usr/sbin/sendmail -t -i -f {{admin_email}} +sendmail_path = /usr/bin/msmtp -t