Exclude the Core 6.0 for styles exported as packages
authorAlexander Ebert <ebert@woltlab.com>
Wed, 13 Nov 2019 12:42:31 +0000 (13:42 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 13 Nov 2019 12:42:31 +0000 (13:42 +0100)
wcfsetup/install/files/lib/data/style/StyleEditor.class.php

index 0d3ed05a988d23510e9f1f2f3d4b343519e1ff04..0c3c0aea472b81f513c30eff9ac931c4d446bef8 100644 (file)
@@ -40,15 +40,13 @@ 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 EXCLUDE_WCF_VERSION = '6.0.0 Alpha 1';
        const INFO_FILE = 'style.xml';
        
        /**
         * list of compatible API versions
         * @var integer[]
+        * @deprecated 5.2
         */
        public static $compatibilityApiVersions = [2018];
        
@@ -931,6 +929,11 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject
                        $xml->writeElement('requiredpackage', 'com.woltlab.wcf', ['minversion' => PackageCache::getInstance()->getPackageByIdentifier('com.woltlab.wcf')->packageVersion]);
                        $xml->endElement();
                        
+                       $xml->startElement('excludedpackages');
+                       $xml->writeElement('excludedpackage', 'com.woltlab.wcf', ['version' => self::EXCLUDE_WCF_VERSION]);
+                       $xml->endElement();
+                       
+                       // @deprecated 5.2
                        $xml->startElement('compatibility');
                        foreach (self::$compatibilityApiVersions as $apiVersion) {
                                $xml->writeElement('api', '', ['version' => $apiVersion]);