I found this small docs problem when exploring solutions to #2544830: Views search filter needs additional WHERE on search_index table and am putting it on its own issue.

The parameter is documented wrong, as far as what it expects, on ViewsSearchQuery::conditionReplaceString()

Patch included.

Comments

jhedstrom’s picture

+++ b/core/modules/search/src/ViewsSearchQuery.php
@@ -69,8 +69,9 @@ public function publicParseSearchExpression() {
-   * @param \Drupal\Core\Database\Query\Condition $condition
...
+   *   item from a $condition->conditions array, which has a 'field' element.

Should we instead of $condition->conditions specify \Drupal\Core\Database\Query\Condition::conditions?

jhodgdon’s picture

No, \Drupal\Core\Database\Query\Condition::conditions is a member variable, not a data type, so I don't think it's correct to use that as a @param type.

jhedstrom’s picture

I didn't mean as the param type, but rather in the param description. $condition->conditions doesn't point me to an example necessarily.

jhodgdon’s picture

StatusFileSize
new893 bytes

Oh yeah, doh, you said that. Good idea! How about this? Didn't bother with interdiff on 4-line patch, hope that is OK.

jhedstrom’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Docs are not frozen in beta. Committed 349e767 and pushed to 8.0.x. Thanks!

  • alexpott committed 349e767 on 8.0.x
    Issue #2544870 by jhodgdon: Docs problem on ViewsSearchQuery::...
jhodgdon’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.