Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion libraries/src/Updater/Adapter/ExtensionAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,18 @@ public function findUpdate($options)
{
if (isset($this->latest->client) && \strlen($this->latest->client))
{
$this->latest->client_id = ApplicationHelper::getClientInfo($this->latest->client, true)->id;
/**
* The client_id in the update XML manifest can be either an integer (backwards
* compatible with Joomla 1.6–3.10) or a string. Backwards compatibility with the
* integer key is only provided in the 4.x release as a means to facilitate
* migration of legacy extensions to Joomla 4. Joomla 5 will remove the b/c code and
* require client_id to be a string key. The string key is one of 'site' or
* 'administrator'.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry to be pedantic but couldnt the client key also be api?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, no and I did check 😉 We do not have api–specific extensions. In fact, the only way to extend the API is by adding an <api> target in the XML manifest of a component. Components are installed in the administrator application i.e. their client_id is 1.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok - cool

*
* @deprecated 5.0
*/
$this->latest->client_id = is_numeric($this->latest->client) ? $this->latest->client
: ApplicationHelper::getClientInfo($this->latest->client, true)->id;

unset($this->latest->client);
}
Expand Down