From: Alexander Ebert Date: Tue, 23 Jan 2018 17:34:05 +0000 (+0100) Subject: Use a static list to expose compatible API versions X-Git-Tag: 3.1.0_RC_2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=654a19b4777f156b1f7fe294d98e7d5c2d1facc9;p=GitHub%2FWoltLab%2FWCF.git Use a static list to expose compatible API versions --- diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index 2283ec34f7..9552547b67 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -40,9 +40,18 @@ use wcf\util\XMLWriter; * @mixin Style */ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject { + /** + * @deprecated 3.1 use the compatibility api versions instead + */ const EXCLUDE_WCF_VERSION = '3.2.0 Alpha 1'; const INFO_FILE = 'style.xml'; + /** + * list of compatible API versions + * @var integer[] + */ + public static $compatibilityApiVersions = [2018]; + /** * @inheritDoc */ @@ -888,7 +897,9 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject $xml->endElement(); $xml->startElement('compatibility'); - $xml->writeElement('api', '', ['version' => 2018]); + foreach (self::$compatibilityApiVersions as $apiVersion) { + $xml->writeElement('api', '', ['version' => $apiVersion]); + } $xml->endElement(); $xml->startElement('instructions', ['type' => 'install']);