1
0
Fork 0
mirror of synced 2024-07-01 20:50:49 +12:00

refactor: remove version format const

This commit is contained in:
loks0n 2024-05-24 16:27:13 +01:00
parent ad3cc4e68f
commit d73a9e75cd
2 changed files with 2 additions and 3 deletions

View file

@ -554,8 +554,8 @@ App::init()
if (version_compare($responseFormat, '1.5.0', '<')) {
$response->addFilter(new ResponseV17());
}
if (version_compare($responseFormat, APP_VERSION_FORMAT, '>')) {
$response->addHeader('X-Appwrite-Warning', "The current SDK is built for Appwrite ${responseFormat}. However, the current Appwrite server version is ${APP_VERSION_STABLE}. Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks");
if (version_compare($responseFormat, APP_VERSION_STABLE, '>')) {
$response->addHeader('X-Appwrite-Warning', "The current SDK is built for Appwrite " . $responseFormat . ". However, the current Appwrite server version is ". APP_VERSION_STABLE . ". Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks");
}
}

View file

@ -114,7 +114,6 @@ const APP_USER_ACCCESS = 24 * 60 * 60; // 24 hours
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
const APP_CACHE_BUSTER = 432;
const APP_VERSION_STABLE = '1.5.6';
const APP_VERSION_FORMAT = '1.5.0'; // Response format version, typically the last minor version
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
const APP_DATABASE_ATTRIBUTE_IP = 'ip';