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

Provide an enum for BSON types supported by $type operator

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Builder
    • None

      https://github.com/mongodb/mongo-php-builder/pull/23#discussion_r1453186123

      The code would look like this:

              $pipeline = new Pipeline(
                  Stage::match(
                      zipCode: Type::Array,
                      number: [Type::Int, Type::Long],
                  ),
              );
      

            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:
            2 Start watching this issue

              Created:
              Updated: