Remove php72 and php73
This commit is contained in:
@@ -89,7 +89,7 @@ class WOCleanController(CementBaseController):
|
||||
Log.debug(self, "{0}".format(e))
|
||||
Log.debug(self, "Unable hit url, "
|
||||
" http://127.0.0.1/cache/opcache/"
|
||||
"php72.php,"
|
||||
"phpXX.php,"
|
||||
" please check you have admin tools installed")
|
||||
Log.debug(self, "please check you have admin tools installed,"
|
||||
" or install them with `wo stack install --admin`")
|
||||
|
||||
@@ -66,7 +66,7 @@ class WOSiteCreateController(CementBaseController):
|
||||
action='store', nargs='?')),
|
||||
(['--subsiteof'],
|
||||
dict(help="create a subsite of a multisite install",
|
||||
action='store', nargs='?')),
|
||||
action='store', nargs='?')),
|
||||
(['-le', '--letsencrypt'],
|
||||
dict(help="configure letsencrypt ssl for the site",
|
||||
action='store' or 'store_const',
|
||||
@@ -219,14 +219,13 @@ class WOSiteCreateController(CementBaseController):
|
||||
data["wpce"] = parent_site_info.cache_type == 'wpce'
|
||||
data["wpredis"] = parent_site_info.cache_type == 'wpredis'
|
||||
data["wpsubdir"] = parent_site_info.site_type == 'wpsubdir'
|
||||
data["wo_php"] = ("php" + parent_site_info.php_version).replace(".", "")
|
||||
data["wo_php"] = ("php" + parent_site_info.php_version).replace(".", "")
|
||||
data['subsite'] = True
|
||||
data['subsiteof_name'] = subsiteof_name
|
||||
data['subsiteof_webroot'] = parent_site_info.site_path
|
||||
|
||||
|
||||
if (pargs.php72 or pargs.php73 or pargs.php74 or
|
||||
pargs.php80 or pargs.php81 or pargs.php82 or pargs.php83):
|
||||
if (pargs.php74 or pargs.php80 or pargs.php81 or
|
||||
pargs.php82 or pargs.php83):
|
||||
data = dict(
|
||||
site_name=wo_domain, www_domain=wo_www_domain,
|
||||
static=False, basic=False,
|
||||
@@ -296,7 +295,7 @@ class WOSiteCreateController(CementBaseController):
|
||||
(not pargs.wprocket) and
|
||||
(not pargs.wpce) and
|
||||
(not pargs.wpredis) and
|
||||
(not pargs.subsiteof)):
|
||||
(not pargs.subsiteof)):
|
||||
data['basic'] = True
|
||||
|
||||
if (cache == 'wpredis'):
|
||||
|
||||
@@ -835,8 +835,8 @@ def site_package_check(self, stype):
|
||||
stack = WOStackController()
|
||||
stack.app = self.app
|
||||
pargs = self.app.pargs
|
||||
if stype in ['html', 'proxy', 'php', 'php72', 'mysql', 'wp', 'wpsubdir',
|
||||
'wpsubdomain', 'php73', 'php74', 'php80', 'php81', 'php82', 'php83', 'alias', 'subsite']:
|
||||
if stype in ['html', 'proxy', 'php', 'mysql', 'wp', 'wpsubdir',
|
||||
'wpsubdomain', 'php74', 'php80', 'php81', 'php82', 'php83', 'alias', 'subsite']:
|
||||
Log.debug(self, "Setting apt_packages variable for Nginx")
|
||||
|
||||
# Check if server has nginx-custom package
|
||||
@@ -872,15 +872,15 @@ def site_package_check(self, stype):
|
||||
wo_nginx.write('fastcgi_param \tSCRIPT_FILENAME '
|
||||
'\t$request_filename;\n')
|
||||
|
||||
php_versions = ['php72', 'php73', 'php74', 'php80', 'php81', 'php82', 'php83']
|
||||
php_versions = ['php74', 'php80', 'php81', 'php82', 'php83']
|
||||
|
||||
selected_versions = [version for version in php_versions if getattr(pargs, version)]
|
||||
if len(selected_versions) > 1:
|
||||
Log.error(self, "Error: two different PHP versions cannot be "
|
||||
"combined within the same WordOps site")
|
||||
|
||||
if ((not pargs.php72) and (not pargs.php73) and (not pargs.php74) and
|
||||
(not pargs.php80) and (not pargs.php81) and (not pargs.php82) and
|
||||
if ((not pargs.php74) and (not pargs.php80) and
|
||||
(not pargs.php81) and (not pargs.php82) and
|
||||
(not pargs.php83) and
|
||||
stype in ['php', 'mysql', 'wp', 'wpsubdir',
|
||||
'wpsubdomain']):
|
||||
@@ -1082,8 +1082,8 @@ def detSitePar(opts):
|
||||
cachelist = list()
|
||||
for key, val in opts.items():
|
||||
if val and key in ['html', 'php', 'mysql', 'wp',
|
||||
'wpsubdir', 'wpsubdomain', 'php72',
|
||||
'php73', 'php74', 'php80', 'php81', 'php82', 'php83']:
|
||||
'wpsubdir', 'wpsubdomain',
|
||||
'php74', 'php80', 'php81', 'php82', 'php83']:
|
||||
typelist.append(key)
|
||||
elif val and key in ['wpfc', 'wpsc', 'wpredis', 'wprocket', 'wpce']:
|
||||
cachelist.append(key)
|
||||
@@ -1099,18 +1099,6 @@ def detSitePar(opts):
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('php72', 'mysql', 'html') for x in typelist]:
|
||||
sitetype = 'mysql'
|
||||
if not cachelist:
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('php73', 'mysql', 'html') for x in typelist]:
|
||||
sitetype = 'mysql'
|
||||
if not cachelist:
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('php74', 'mysql', 'html') for x in typelist]:
|
||||
sitetype = 'mysql'
|
||||
if not cachelist:
|
||||
@@ -1147,18 +1135,6 @@ def detSitePar(opts):
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('php72', 'mysql') for x in typelist]:
|
||||
sitetype = 'mysql'
|
||||
if not cachelist:
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('php73', 'mysql') for x in typelist]:
|
||||
sitetype = 'mysql'
|
||||
if not cachelist:
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('php74', 'mysql') for x in typelist]:
|
||||
sitetype = 'mysql'
|
||||
if not cachelist:
|
||||
@@ -1213,18 +1189,6 @@ def detSitePar(opts):
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('wp', 'php72') for x in typelist]:
|
||||
sitetype = 'wp'
|
||||
if not cachelist:
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('wp', 'php73') for x in typelist]:
|
||||
sitetype = 'wp'
|
||||
if not cachelist:
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('wp', 'php74') for x in typelist]:
|
||||
sitetype = 'wp'
|
||||
if not cachelist:
|
||||
@@ -1255,18 +1219,6 @@ def detSitePar(opts):
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('wpsubdir', 'php72') for x in typelist]:
|
||||
sitetype = 'wpsubdir'
|
||||
if not cachelist:
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('wpsubdir', 'php73') for x in typelist]:
|
||||
sitetype = 'wpsubdir'
|
||||
if not cachelist:
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('wpsubdir', 'php74') for x in typelist]:
|
||||
sitetype = 'wpsubdir'
|
||||
if not cachelist:
|
||||
@@ -1297,18 +1249,6 @@ def detSitePar(opts):
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('wpsubdomain', 'php72') for x in typelist]:
|
||||
sitetype = 'wpsubdomain'
|
||||
if not cachelist:
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('wpsubdomain', 'php73') for x in typelist]:
|
||||
sitetype = 'wpsubdomain'
|
||||
if not cachelist:
|
||||
cachetype = 'basic'
|
||||
else:
|
||||
cachetype = cachelist[0]
|
||||
elif False not in [x in ('wpsubdomain', 'php74') for x in typelist]:
|
||||
sitetype = 'wpsubdomain'
|
||||
if not cachelist:
|
||||
@@ -1345,12 +1285,6 @@ def detSitePar(opts):
|
||||
if not typelist and not cachelist:
|
||||
sitetype = None
|
||||
cachetype = None
|
||||
elif (not typelist or "php72" in typelist) and cachelist:
|
||||
sitetype = 'wp'
|
||||
cachetype = cachelist[0]
|
||||
elif (not typelist or "php73" in typelist) and cachelist:
|
||||
sitetype = 'wp'
|
||||
cachetype = cachelist[0]
|
||||
elif (not typelist or "php74" in typelist) and cachelist:
|
||||
sitetype = 'wp'
|
||||
cachetype = cachelist[0]
|
||||
|
||||
@@ -196,8 +196,8 @@ class WOSiteUpdateController(CementBaseController):
|
||||
|
||||
if ((pargs.password or pargs.hsts or
|
||||
pargs.ngxblocker or pargs.letsencrypt == 'renew') and not (
|
||||
pargs.html or pargs.php or pargs.php72 or pargs.php73 or
|
||||
pargs.php74 or pargs.php80 or pargs.php81 or pargs.php82 or
|
||||
pargs.html or pargs.php or pargs.php74 or pargs.php80 or
|
||||
pargs.php81 or pargs.php82 or
|
||||
pargs.php83 or pargs.mysql or pargs.wp or pargs.wpfc or pargs.wpsc or
|
||||
pargs.wprocket or pargs.wpce or
|
||||
pargs.wpsubdir or pargs.wpsubdomain)):
|
||||
@@ -264,20 +264,18 @@ class WOSiteUpdateController(CementBaseController):
|
||||
return 0
|
||||
|
||||
if (((stype == 'php' and
|
||||
oldsitetype not in ['html', 'proxy', 'php', 'php72',
|
||||
'php73', 'php74', 'php80',
|
||||
oldsitetype not in ['html', 'proxy', 'php', 'php74', 'php80',
|
||||
'php81', 'php82', 'php83']) or
|
||||
(stype == 'mysql' and oldsitetype not in [
|
||||
'html', 'php', 'php72', 'php73', 'php74', 'php80', 'php81',
|
||||
'html', 'php', 'php74', 'php80', 'php81',
|
||||
'php82', 'php83', 'proxy']) or
|
||||
(stype == 'wp' and oldsitetype not in [
|
||||
'html', 'php', 'php72', 'php73', 'php74', 'php80', 'php81',
|
||||
'html', 'php', 'php74', 'php80', 'php81',
|
||||
'php82', 'php83', 'mysql', 'proxy', 'wp']) or
|
||||
(stype == 'wpsubdir' and oldsitetype in ['wpsubdomain']) or
|
||||
(stype == 'wpsubdomain' and oldsitetype in ['wpsubdir']) or
|
||||
(stype == oldsitetype and cache == oldcachetype)) and
|
||||
not (pargs.php72 or pargs.php73 or
|
||||
pargs.php74 or pargs.php80 or
|
||||
not (pargs.php74 or pargs.php80 or
|
||||
pargs.php81 or pargs.php82 or
|
||||
pargs.php83 or pargs.alias)):
|
||||
Log.info(self, Log.FAIL + "can not update {0} {1} to {2} {3}".
|
||||
@@ -336,8 +334,7 @@ class WOSiteUpdateController(CementBaseController):
|
||||
data = dict(
|
||||
site_name=wo_domain, www_domain=wo_www_domain,
|
||||
static=False, basic=True, wp=False, wpfc=False,
|
||||
php72=False, php73=False, php74=False,
|
||||
php80=False, php81=False, php82=False, php83=False,
|
||||
php74=False, php80=False, php81=False, php82=False, php83=False,
|
||||
wpsc=False, wpredis=False, wprocket=False, wpce=False,
|
||||
multisite=False, wpsubdir=False, webroot=wo_site_webroot,
|
||||
currsitetype=oldsitetype, currcachetype=oldcachetype)
|
||||
@@ -361,11 +358,11 @@ class WOSiteUpdateController(CementBaseController):
|
||||
if stype == 'wpsubdir':
|
||||
data['wpsubdir'] = True
|
||||
|
||||
if ((pargs.php72 or pargs.php73 or pargs.php74 or
|
||||
pargs.php80 or pargs.php81 or pargs.php82 or pargs.php83) and
|
||||
if ((pargs.php74 or pargs.php80 or pargs.php81 or
|
||||
pargs.php82 or pargs.php83) and
|
||||
(not data)):
|
||||
Log.debug(
|
||||
self, "pargs php72, or php73, or php74, "
|
||||
self, "pargs php74, "
|
||||
"or php80, or php81 or php82 or php83 enabled")
|
||||
data = dict(
|
||||
site_name=wo_domain,
|
||||
@@ -433,8 +430,7 @@ class WOSiteUpdateController(CementBaseController):
|
||||
self, f"PHP {version} is already enabled for given site")
|
||||
setattr(pargs, pargs_version, False)
|
||||
|
||||
if (data and (not pargs.php73) and
|
||||
(not pargs.php74) and (not pargs.php72) and
|
||||
if (data and (not pargs.php74) and
|
||||
(not pargs.php80) and (not pargs.php81) and (not pargs.php82)
|
||||
and (not pargs.php83)):
|
||||
data[pargs_version] = bool(old_version_var is True)
|
||||
|
||||
@@ -183,8 +183,6 @@ class WOStackController(CementBaseController):
|
||||
Log.debug(self, "Redis already installed")
|
||||
|
||||
wo_vars = {
|
||||
'php72': WOVar.wo_php72,
|
||||
'php73': WOVar.wo_php73,
|
||||
'php74': WOVar.wo_php74,
|
||||
'php80': WOVar.wo_php80,
|
||||
'php81': WOVar.wo_php81,
|
||||
@@ -594,8 +592,6 @@ class WOStackController(CementBaseController):
|
||||
|
||||
# Create a dictionary that maps PHP versions to corresponding variables.
|
||||
wo_vars = {
|
||||
'php72': WOVar.wo_php72,
|
||||
'php73': WOVar.wo_php73,
|
||||
'php74': WOVar.wo_php74,
|
||||
'php80': WOVar.wo_php80,
|
||||
'php81': WOVar.wo_php81,
|
||||
@@ -855,8 +851,6 @@ class WOStackController(CementBaseController):
|
||||
if pargs.all:
|
||||
pargs.web = True
|
||||
pargs.admin = True
|
||||
pargs.php72 = True
|
||||
pargs.php73 = True
|
||||
pargs.php74 = True
|
||||
pargs.php80 = True
|
||||
pargs.php81 = True
|
||||
@@ -898,8 +892,6 @@ class WOStackController(CementBaseController):
|
||||
Log.info(self, "Nginx is not installed")
|
||||
|
||||
wo_vars = {
|
||||
'php72': WOVar.wo_php72,
|
||||
'php73': WOVar.wo_php73,
|
||||
'php74': WOVar.wo_php74,
|
||||
'php80': WOVar.wo_php80,
|
||||
'php81': WOVar.wo_php81,
|
||||
|
||||
@@ -101,8 +101,6 @@ class WOStackUpgradeController(CementBaseController):
|
||||
|
||||
if pargs.web:
|
||||
pargs.nginx = True
|
||||
pargs.php72 = True
|
||||
pargs.php73 = True
|
||||
pargs.php74 = True
|
||||
pargs.php80 = True
|
||||
pargs.php81 = True
|
||||
@@ -136,8 +134,6 @@ class WOStackUpgradeController(CementBaseController):
|
||||
Log.info(self, "Nginx Stable is not already installed")
|
||||
|
||||
wo_vars = {
|
||||
'php72': WOVar.wo_php72,
|
||||
'php73': WOVar.wo_php73,
|
||||
'php74': WOVar.wo_php74,
|
||||
'php80': WOVar.wo_php80,
|
||||
'php81': WOVar.wo_php81,
|
||||
|
||||
Reference in New Issue
Block a user