Breaking: #79615 - QueryBuilder getQueriedTables result format change

See Issue #79615

Description

QueryBuilder::getQueriedTables return value has been changed from array with key being table name and value being table alias (or null) to array with a key being table alias and value being table name. Both key and the value should be filled. This allows to return multiple entries for the same table (in case inner join is made).

Example for the tt_content table inner joined with self and joined with sys_language:

[
  'tt_content_alias' => 'tt_content',
  'tt_content' => 'tt_content',
  'sys_language' => 'sys_language'
]

Previously the array (for the same case) looked like:

[
  'tt_content' => 'tt_content_alias',
  'sys_language' => null
]

Impact

All code which rely on the result format of the getQueriedTables method needs to be adapted. The first parameter of the QueryRestrictionInterface::buildExpression ($queriedTables) expects a new array structure.

Affected Installations

All installations with custom implementation of Query Restriction (classes implementing QueryRestrictionInterface). All installations where table array passed to buildExpression method is created manually (without using QueryBuilder::getQueriedTables).

Migration

The code of the buildExpression method in custom QueryRestrictionInterface implementations needs to adapted to be able to handle the new incoming array structure. Format of the first parameter passed to buildExpression needs to be adapted in case a query restriction is used directly (without using QueryBuilder::getQueriedTables).