<dt>{lang}wcf.acp.index.system.software.version{/lang}</dt>
<dd>{@WCF_VERSION}</dd>
</dl>
- <dl>
- <dt>{lang}wcf.acp.index.system.software.apiVersion{/lang}</dt>
- <dd>{@WSC_API_VERSION}</dd>
- </dl>
- {if !$__wcf->getSupportedLegacyApiVersions()|empty}
- <dl>
- <dt>{lang}wcf.acp.index.system.software.legacyApiVersions{/lang}</dt>
- <dd><small>{implode from=$__wcf->getSupportedLegacyApiVersions() item=version glue=', '}{$version}{/implode}</small></dd>
- </dl>
- {/if}
{event name='softwareFields'}
define('WCF_VERSION', '5.2.0 Beta 3');
// define current API version
+// @deprecated 5.2
define('WSC_API_VERSION', 2019);
// define current unix timestamp
/**
* list of supported legacy API versions
* @var integer[]
+ * @deprecated 5.2
*/
private static $supportedLegacyApiVersions = [2017, 2018];
*
* @param integer $apiVersion
* @return boolean
+ * @deprecated 5.2
*/
public static function isSupportedApiVersion($apiVersion) {
return ($apiVersion == WSC_API_VERSION) || in_array($apiVersion, self::$supportedLegacyApiVersions);
* Returns the list of supported legacy API versions.
*
* @return integer[]
+ * @deprecated 5.2
*/
public static function getSupportedLegacyApiVersions() {
return self::$supportedLegacyApiVersions;
/**
* list of compatible API versions
* @var integer[]
+ * @deprecated 5.2
*/
protected $compatibility = [];
$this->compatibility[] = $version;
}
+ // API compatibility implies an exclude of `com.woltlab.wcf` in version `6.0.0 Alpha 1`, unless a lower version is explicitly excluded.
+ if (!empty($this->compatibility)) {
+ $excludeCore60 = '6.0.0 Alpha 1';
+
+ $coreExclude = '';
+ foreach ($this->excludedPackages as $excludedPackage) {
+ if ($excludedPackage['name'] === 'com.woltlab.wcf') {
+ $coreExclude = $excludedPackage['version'];
+ break;
+ }
+ }
+
+ if (!$coreExclude || Package::compareVersion($coreExclude, $excludeCore60, '>')) {
+ if ($coreExclude) {
+ $this->excludedPackages = array_filter($this->excludedPackages, function($exclude) {
+ return $exclude['name'] !== 'com.woltlab.wcf';
+ });
+ }
+
+ $this->excludedPackages[] = [
+ 'name' => 'com.woltlab.wcf',
+ 'version' => $excludeCore60,
+ ];
+ }
+ }
+
// get instructions
$elements = $xpath->query('./ns:instructions', $package);
foreach ($elements as $element) {
* Returns the list of compatible API versions.
*
* @return integer[]
+ * @deprecated 5.2
*/
public function getCompatibleVersions() {
return $this->compatibility;
throw new PackageValidationException(PackageValidationException::INCOMPATIBLE_API_VERSION, ['isOlderVersion' => $isOlderVersion]);
}
}
- else if (ENABLE_DEBUG_MODE && ENABLE_DEVELOPER_TOOLS && ($package === null || $package->package !== 'com.woltlab.wcf')) {
- throw new PackageValidationException(PackageValidationException::MISSING_API_VERSION);
- }
+ // Missing details on API compatibility are no longer an error.
// package is not installed yet
if ($package === null) {
/**
* the provided API version string is invalid and does not fall into the range from `2017` through `2099`
* @var integer
+ * @deprecated 5.2
*/
const INVALID_API_VERSION = 13;
/**
* the package is not compatible with the current API version or any other of the supported ones
* @var integer
+ * @deprecated 5.2
*/
const INCOMPATIBLE_API_VERSION = 14;
/**
* the package lacks any sort of API compatibility data
* @var integer
+ * @deprecated 5.2
*/
const MISSING_API_VERSION = 15;