PHPStorm warning in Search operator chaining in Doctrine Agg Builder

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Doctrine
    • None
    • None
    • PHP Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      PHPStorm reports a static analysis error:

      Method 'autocomplete' not found in \Doctrine\ODM\MongoDB\Aggregation\Stage\Search\Text  

      With this code:

      $aggregationBuilder->search()->compound()->should()
          ->text()
              ->path('name')
              ->query($value)
              ->fuzzy(1)
              ->boostScore(2.0)
          ->text()
              ->path('brand')
              ->query($value)
          ->autocomplete('name')
              ->query($value)
              ->fuzzy(2)
              ->boostScore(1.0);

      Check if there is an inconsistency in the return type of a method. 

        1. image-2025-09-16-14-31-26-449.png
          112 kB
          Jérôme Tamarelle

            Assignee:
            Jérôme Tamarelle
            Reporter:
            Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: