From c2f0542afaadf4ae2578fb9b8679fb69d2d237fa Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 25 Jan 2022 16:43:55 +0100 Subject: [PATCH] Fix php8.1 package install --- CHANGELOG.md | 6 +++++- wo/cli/plugins/site_update.py | 25 ++++++++++++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aca5e5..1754bee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Releases -### v3.9.x - [Unreleased] +### v3.14.0 - [Unreleased] + +#### Added + +- PHP 8.0 and 8.1 support #### v3.13.2 - 2020-10-27 diff --git a/wo/cli/plugins/site_update.py b/wo/cli/plugins/site_update.py index 6fdd626..dfa3dfb 100644 --- a/wo/cli/plugins/site_update.py +++ b/wo/cli/plugins/site_update.py @@ -274,7 +274,7 @@ class WOSiteUpdateController(CementBaseController): oldsitetype not in ['html', 'proxy', 'php', 'php72', 'php73', 'php74', 'php80', 'php81']) or (stype == 'mysql' and oldsitetype not in [ - 'html', 'php', 'php72', 'php73', 'php74','php80', 'php81', + 'html', 'php', 'php72', 'php73', 'php74', 'php80', 'php81', 'proxy']) or (stype == 'wp' and oldsitetype not in [ 'html', 'php', 'php72', 'php73', 'php74', 'php80', 'php81', @@ -282,7 +282,8 @@ class WOSiteUpdateController(CementBaseController): (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.php72 or pargs.php73 or + pargs.php74 or pargs.php80 or pargs.php81)): Log.info(self, Log.FAIL + "can not update {0} {1} to {2} {3}". format(oldsitetype, oldcachetype, stype, cache)) @@ -302,7 +303,8 @@ 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, + php72=False, php73=False, php74=False, + php80=False, php81=False, wpsc=False, wpredis=False, wprocket=False, wpce=False, multisite=False, wpsubdir=False, webroot=wo_site_webroot, currsitetype=oldsitetype, currcachetype=oldcachetype) @@ -329,7 +331,8 @@ class WOSiteUpdateController(CementBaseController): if ((pargs.php72 or pargs.php73 or pargs.php74 or pargs.php80 or pargs.php81) and (not data)): Log.debug( - self, "pargs php72, or php73, or php74, or php80, or php81 enabled") + self, "pargs php72, or php73, or php74, " + "or php80, or php81 enabled") data = dict( site_name=wo_domain, www_domain=wo_www_domain, @@ -475,9 +478,9 @@ class WOSiteUpdateController(CementBaseController): data['php80'] = bool(old_php80 is True) Log.debug(self, "data php80 = {0}".format(data['php80'])) php80 = bool(old_php80 is True) - data['php80'] = bool(old_php80 is True) - Log.debug(self, "data php80 = {0}".format(data['php80'])) - php80 = bool(old_php80 is True) + data['php81'] = bool(old_php81 is True) + Log.debug(self, "data php81 = {0}".format(data['php81'])) + php81 = bool(old_php81 is True) if pargs.letsencrypt: acme_domains = [] @@ -558,7 +561,7 @@ class WOSiteUpdateController(CementBaseController): (php74 is old_php74) and (php80 is old_php80) and (php81 is old_php81) and (stype == oldsitetype and - cache == oldcachetype)): + cache == oldcachetype)): Log.debug(self, "Nothing to update") return 1 @@ -578,8 +581,8 @@ class WOSiteUpdateController(CementBaseController): data['wo_php'] = 'php81' check_php_version = '8.1' else: - data['wo_php'] = 'php73' - check_php_version = '7.3' + data['wo_php'] = 'php80' + check_php_version = '8.0' if pargs.hsts: data['hsts'] = bool(pargs.hsts == "on") @@ -878,7 +881,7 @@ class WOSiteUpdateController(CementBaseController): # Setup WordPress if old sites are html/php/mysql sites if data['wp'] and oldsitetype in ['html', 'proxy', 'php', 'php72', 'mysql', 'php73', 'php74', 'php80', - 'php81',]: + 'php81', ]: try: wo_wp_creds = setupwordpress(self, data) except SiteError as e: