Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions generator/config/expressions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace MongoDB\Builder\Expression;

use DateTimeInterface;
use MongoDB\BSON;
use MongoDB\Builder\Pipeline;
use MongoDB\Builder\Type;
Expand All @@ -26,7 +27,7 @@
'binData' => ['string', BSON\Binary::class],
'objectId' => [BSON\ObjectId::class],
'bool' => ['bool'],
'date' => [BSON\UTCDateTime::class],
'date' => [BSON\UTCDateTime::class, DateTimeInterface::class],
'null' => ['null'],
'regex' => [BSON\Regex::class],
'javascript' => ['string', BSON\Javascript::class],
Expand All @@ -37,7 +38,7 @@
];

// "any" accepts all the BSON types. No generic "object" or "mixed"
$bsonTypes['any'] = ['bool', 'int', 'float', 'string', 'array', 'null', stdClass::class, BSON\Type::class];
$bsonTypes['any'] = ['bool', 'int', 'float', 'string', 'array', 'null', stdClass::class, BSON\Type::class, DateTimeInterface::class];

// "number" accepts all the numeric types
$bsonTypes['number'] = ['int', 'float', BSON\Int64::class, BSON\Decimal128::class];
Expand Down
12 changes: 7 additions & 5 deletions src/Builder/Accumulator/AddToSetAccumulator.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src/Builder/Accumulator/BottomAccumulator.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src/Builder/Accumulator/BottomNAccumulator.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src/Builder/Accumulator/DerivativeAccumulator.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading