-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: CRUD
-
None
-
None
-
PHP Drivers
-
None
-
None
-
None
-
None
-
None
-
None
The $convert aggregation expression's base parameter (added in MongoDB 8.3) accepts any aggregation expression server-side (parsed via parseOperand() in expression.cpp).
The PHP builder should support both:
- A closed enum of allowed literal values: 2 (binary), 8 (octal), 10 (decimal), 16 (hexadecimal)
- Any expression that resolves to an integer (e.g. a field path, variable, or computed expression)
This mirrors the pattern used for other builder parameters that accept either a typed literal or a generic expression.
Reference:
- MQL spec PR: https://github.com/mongodb/mql-specifications/pull/41
- Server source: src/mongo/db/pipeline/expression.cpp