Change filter typehint from string to mixed
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3538476. --> Reported by: [kim.pepper](https://www.drupal.org/user/370574) Related to !799 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>In <code>\Drupal\ai_search\AiVdbProviderSearchApiInterface::prepareFilters() </code>we return <code>mixed</code> type. However, in <code>\Drupal\ai\AiVdbProviderInterface::querySearch()</code> and <code>vectorSearch() </code>we require a <code>string</code> type. </p> <p>The doc blocks state:</p> <pre>&nbsp;&nbsp; * @param mixed $filters<br>&nbsp;&nbsp; *&nbsp;&nbsp; The filters as prepared by the VDB provider in ::prepareFilters().</pre><p>Which contradicts the param type.</p> <h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Change the <code>string $filters = ''</code> param in <code>querySearch()</code> and <code>vectorSearch()</code> to accept mixed type.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3>Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)</h3>
issue