PHPStorm warning in Search operator chaining in Doctrine Agg Builder

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • doctrine-2.12.0
    • Affects Version/s: None
    • Component/s: Doctrine
    • None
    • 🔵 Done
    • PHP Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • 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:
              Resolved: