mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
RPC: add deprecation warning for v1-v4 usage
With FastAPI starting to come closer to a close, we've got to advertise this deprecation so that users have some time to adjust before making the changes. We have not specified a specific time here, but we'd like this message to reach users of the RPC API for at least a month before any modifications are made to the interface. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
565f62471b
commit
cfa95ef80a
1 changed files with 9 additions and 0 deletions
|
@ -272,6 +272,15 @@ class AurJSON {
|
||||||
'results' => $data
|
'results' => $data
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($this->version != 5) {
|
||||||
|
$json_array['warning'] = 'The use of versions lower than 5 is '
|
||||||
|
. 'now deprecated and will soon be unsupported. To ensure '
|
||||||
|
. 'your API client supports the change without issue, it '
|
||||||
|
. 'should use version 5 and adjust for any changes in the '
|
||||||
|
. 'API interface. See https://aur.archlinux.org/rpc for '
|
||||||
|
. 'documentation related to v5.';
|
||||||
|
}
|
||||||
|
|
||||||
if ($error) {
|
if ($error) {
|
||||||
$json_array['error'] = $error;
|
$json_array['error'] = $error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue