Remove support for the API compatibility tags from dev tools
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 5 Jul 2021 14:09:47 +0000 (16:09 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 5 Jul 2021 14:22:36 +0000 (16:22 +0200)
wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php
wcfsetup/install/files/lib/acp/form/DevtoolsProjectEditForm.class.php
wcfsetup/install/files/lib/system/devtools/package/DevtoolsPackageXmlWriter.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 947261e82d519123d40c10ed83cfc7f60e46df44..b9466f2cfb94e845f6850a80ca9ef3bed1a262a7 100644 (file)
@@ -23,7 +23,6 @@ use wcf\system\form\builder\field\devtools\project\DevtoolsProjectExcludedPackag
 use wcf\system\form\builder\field\devtools\project\DevtoolsProjectInstructionsFormField;
 use wcf\system\form\builder\field\devtools\project\DevtoolsProjectOptionalPackagesFormField;
 use wcf\system\form\builder\field\devtools\project\DevtoolsProjectRequiredPackagesFormField;
-use wcf\system\form\builder\field\MultipleSelectionFormField;
 use wcf\system\form\builder\field\RadioButtonFormField;
 use wcf\system\form\builder\field\TextFormField;
 use wcf\system\form\builder\field\UrlFormField;
@@ -330,33 +329,6 @@ class DevtoolsProjectAddForm extends AbstractFormBuilderForm
             );
         $dataTab->appendChild($authorInformation);
 
-        $compatibility = FormContainer::create('compatibility')
-            ->label('wcf.acp.devtools.project.compatibility')
-            ->appendChildren([
-                MultipleSelectionFormField::create('apiVersions')
-                    ->label('wcf.acp.devtools.project.apiVersions')
-                    ->description('wcf.acp.devtools.project.apiVersions.description')
-                    ->options(static function () {
-                        $apiVersions = \array_filter(\array_merge(
-                            WCF::getSupportedLegacyApiVersions(),
-                            [WSC_API_VERSION]
-                        ), static function ($value) {
-                            return $value !== 2017;
-                        });
-
-                        \sort($apiVersions);
-
-                        return \array_combine($apiVersions, $apiVersions);
-                    })
-                    ->available($this->formObject === null || !$this->formObject->isCore()),
-            ])
-            ->addDependency(
-                ValueFormFieldDependency::create('mode')
-                    ->field($mode)
-                    ->values(['edit', 'setup'])
-            );
-        $dataTab->appendChild($compatibility);
-
         $requiredPackages = FormContainer::create('requiredPackagesContainer')
             ->label('wcf.acp.devtools.project.requiredPackages')
             ->description('wcf.acp.devtools.project.requiredPackages.description')
index a759cb4d24cba9798dd4dc059c7a4b8f8ff17a40..0d9e1aac0e3f9b793def0c46868c988855efc906 100644 (file)
@@ -12,7 +12,6 @@ use wcf\system\form\builder\field\devtools\project\DevtoolsProjectExcludedPackag
 use wcf\system\form\builder\field\devtools\project\DevtoolsProjectInstructionsFormField;
 use wcf\system\form\builder\field\devtools\project\DevtoolsProjectOptionalPackagesFormField;
 use wcf\system\form\builder\field\devtools\project\DevtoolsProjectRequiredPackagesFormField;
-use wcf\system\form\builder\field\MultipleSelectionFormField;
 use wcf\system\form\builder\field\TextFormField;
 use wcf\system\language\LanguageFactory;
 use wcf\system\WCF;
@@ -251,10 +250,6 @@ class DevtoolsProjectEditForm extends DevtoolsProjectAddForm
             $authorUrl->value($packageArchive->getAuthorInfo('authorURL'));
         }
 
-        /** @var MultipleSelectionFormField $apiVersions */
-        $apiVersions = $this->form->getNodeById('apiVersions');
-        $apiVersions->value($packageArchive->getCompatibleVersions());
-
         $requirements = $packageArchive->getRequirements();
         if (!empty($requirements)) {
             $requirementData = [];
index 7ca02fba80dee0d5559f95b79f573584a9bf707c..4743a3273fd68135b18cc42f5ac90c9ab25e0ca9 100644 (file)
@@ -79,7 +79,6 @@ class DevtoolsPackageXmlWriter
         $this->writeRequiredPackages();
         $this->writeOptionalPackages();
         $this->writeExcludedPackages();
-        $this->writeCompatibility();
         $this->writeInstructions();
 
         $this->xmlWriter->endDocument($this->project->getPackageXmlPath());
@@ -110,24 +109,6 @@ class DevtoolsPackageXmlWriter
         $this->xmlWriter->endElement();
     }
 
-    /**
-     * Writes the `compatibility` element.
-     */
-    protected function writeCompatibility()
-    {
-        if (empty($this->packageXmlData['apiVersions'])) {
-            return;
-        }
-
-        $this->xmlWriter->startElement('compatibility');
-
-        foreach ($this->packageXmlData['apiVersions'] as $apiVersion) {
-            $this->xmlWriter->writeElement('api', '', ['version' => $apiVersion]);
-        }
-
-        $this->xmlWriter->endElement();
-    }
-
     /**
      * Writes the `optionalpackages` element.
      */
index dd50f8c730c8f90fc8158adb48a0bd4f41e99a30..008c4ef10667556df8b4f611a4b76d284e3ccab8 100644 (file)
                <item name="wcf.acp.devtools.project.requiredPackages.description"><![CDATA[Um dieses Paket installieren zu können, müssen die folgenden Paketen bereits installiert sein oder die mitgelieferten Versionen müssen vorher installiert werden.]]></item>
                <item name="wcf.acp.devtools.project.excludedPackages"><![CDATA[Inkompatible Pakete]]></item>
                <item name="wcf.acp.devtools.project.excludedPackages.description"><![CDATA[Dieses Paket kann nicht installiert werden, wenn eines der folgenden Pakete (in der angegebenen <strong>oder neueren</strong> Version) bereits installiert ist.]]></item>
-               <item name="wcf.acp.devtools.project.compatibility"><![CDATA[API-Kompatibilität]]></item>
                <item name="wcf.acp.devtools.project.excludedPackage.excludedPackage"><![CDATA[<kbd>{$packageIdentifier}</kbd>
 {if $version}
        <dl class="plain inlineDataList small">
                <item name="wcf.acp.devtools.project.optionalPackage.packageIdentifier.description"><![CDATA[Der Pfad zur Paketdatei muss <kbd>optionals/{literal}{$packageIdentifier}{/literal}.tar</kbd> lauten.]]></item>
                <item name="wcf.acp.devtools.project.optionalPackages"><![CDATA[Optionale Pakete]]></item>
                <item name="wcf.acp.devtools.project.optionalPackages.description"><![CDATA[Nach der Installation dieses Pakets werden folgende Pakete als optionale Pakete angeboten.]]></item>
-               <item name="wcf.acp.devtools.project.apiVersions"><![CDATA[Kompatible API-Versionen]]></item>
-               <item name="wcf.acp.devtools.project.apiVersions.description"><![CDATA[Das Paket ist mit allen ausgewählten API-Versionen von WoltLab Suite Core kompatibel.]]></item>
                <item name="wcf.acp.devtools.project.requiredPackages.shortTitle"><![CDATA[Voraussetzungen]]></item>
                <item name="wcf.acp.devtools.project.excludedPackages.shortTitle"><![CDATA[Inkompatibilität]]></item>
                <item name="wcf.acp.devtools.project.optionalPackages.shortTitle"><![CDATA[Optionales]]></item>
@@ -5555,5 +5552,8 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|lang
        <item name="wcf.acp.option.blacklist_user_agents.description"/>
        <item name="wcf.global.form.error.lessThan.javaScript"/>
        <item name="wcf.global.form.error.greaterThan.javaScript"/>
+       <item name="wcf.acp.devtools.project.compatibility"/>
+       <item name="wcf.acp.devtools.project.apiVersions"/>
+       <item name="wcf.acp.devtools.project.apiVersions.description"/>
 </delete>
 </language>
index 3a739d372fc4277b610bfb2eea029148d4b77b23..aedfc01b925f6ddd4d1b331900844bfeb070499e 100644 (file)
                <item name="wcf.acp.devtools.project.requiredPackages.description"><![CDATA[In order to install this package, the following packages have to be already installed or the versions delivered together with the package have to be installed first.]]></item>
                <item name="wcf.acp.devtools.project.excludedPackages"><![CDATA[Conflicting Packages]]></item>
                <item name="wcf.acp.devtools.project.excludedPackages.description"><![CDATA[This package cannot be installed if one of the following packages is already installed (in the specified <strong>or new</strong> version).]]></item>
-               <item name="wcf.acp.devtools.project.compatibility"><![CDATA[API Compatibility]]></item>
                <item name="wcf.acp.devtools.project.excludedPackage.excludedPackage"><![CDATA[<kbd>{$packageIdentifier}</kbd>
 {if $version}
        <dl class="plain inlineDataList small">
                <item name="wcf.acp.devtools.project.optionalPackage.packageIdentifier.description"><![CDATA[The path to the package file has to be <kbd>optionals/{literal}{$packageIdentifier}{/literal}.tar</kbd>.]]></item>
                <item name="wcf.acp.devtools.project.optionalPackages"><![CDATA[Optional Packages]]></item>
                <item name="wcf.acp.devtools.project.optionalPackages.description"><![CDATA[The following packages will be offered to be installed optionally after this package has been installed.]]></item>
-               <item name="wcf.acp.devtools.project.apiVersions"><![CDATA[Compatible API Versions]]></item>
-               <item name="wcf.acp.devtools.project.apiVersions.description"><![CDATA[The package is compatible with all of the selected API versions of WoltLab Suite Core.]]></item>
                <item name="wcf.acp.devtools.project.requiredPackages.shortTitle"><![CDATA[Requirements]]></item>
                <item name="wcf.acp.devtools.project.excludedPackages.shortTitle"><![CDATA[Conflicts]]></item>
                <item name="wcf.acp.devtools.project.optionalPackages.shortTitle"><![CDATA[Optional]]></item>
@@ -5556,5 +5553,8 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|langu
        <item name="wcf.acp.option.blacklist_user_agents.description"/>
        <item name="wcf.global.form.error.lessThan.javaScript"/>
        <item name="wcf.global.form.error.greaterThan.javaScript"/>
+       <item name="wcf.acp.devtools.project.compatibility"/>
+       <item name="wcf.acp.devtools.project.apiVersions"/>
+       <item name="wcf.acp.devtools.project.apiVersions.description"/>
 </delete>
 </language>