Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-1597

Allow "string" type in every builder argument that accepts a "resolveTo*" type

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.21.0
    • Affects Version/s: 1.21.0
    • Component/s: Builder
    • None
    • 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?

      Since resolveTo types can be replaced with variable names, we must accept "string" type. 
      Currently, we have to use Expression::fieldPath('fieldName') in places we could use the string $fieldName.

      Example in https://github.com/mongodb/mongo-php-library/blob/110aad7279aa4afb16511429c8e7cb68c8c521ea/tests/Builder/Stage/SearchStageTest.php#L672 

       

            Assignee:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: