mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
show method is x-sdk-name is present
This commit is contained in:
parent
4ef6c23a67
commit
674d928ce2
1 changed files with 2 additions and 1 deletions
|
|
@ -1081,7 +1081,8 @@ App::init()
|
|||
$replaceWith = preg_replace('/\./', '#', $replaceWith, 1);
|
||||
}
|
||||
$deprecatedReplaceWithLink = 'https://appwrite.io/docs/references/cloud/server-rest/' . $replaceWith;
|
||||
$deprecationWarning = 'Route ' . $route->getPath() . ' is deprecated since ' . $deprecatedMethod->getSince() . '. Please use `' . $deprecatedMethod->getReplaceWith() . '` instead. See: ' . $deprecatedReplaceWithLink;
|
||||
$isSdkUsed = !empty($request->getHeader('x-sdk-name')) || !empty($request->getHeader('x-sdk-version'));
|
||||
$deprecationWarning = (!$isSdkUsed ? 'Route ' . $route->getPath() : 'Method `' . $sdkItems[0]->getNamespace() . '.' . $sdkItems[0]->getMethodName() . '`') . ' is deprecated since ' . $deprecatedMethod->getSince() . '. Please use `' . $deprecatedMethod->getReplaceWith() . '` instead. See: ' . $deprecatedReplaceWithLink;
|
||||
$warnings[] = $deprecationWarning;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue