Fix contract of IndexInterface::setDatasources()

Created on 26 October 2024, about 2 months ago

The IndexInterface::setDatasources() method currently specifies that its $datasources parameter is just an array of datasources. However, looking at the implementation in Index::setDatasources() it is clear that the code in fact requires the array to be keyed by the datasource plugin IDs.

We should either amend the doc comment (which should be fine, as I don’t think anyone would have working code that passes the parameter wrongly) or fix the method implementation to manually re-key the array (which might also help people calling this method in the future to not worry about the array keys).

πŸ› Bug report
Status

Active

Version

1.0

Component

Framework

Created by

πŸ‡¦πŸ‡ΉAustria drunken monkey Vienna, Austria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024