Skip to content

Merge v1.x into v2.x #1611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
44 changes: 36 additions & 8 deletions .evergreen/config/generated/build/build-extension.yml

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

11 changes: 9 additions & 2 deletions .evergreen/config/templates/build/build-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
vars:
PHP_VERSION: "%phpVersion%"
- func: "compile extension"
# TODO: remove once 1.21.0 is released
vars:
EXTENSION_BRANCH: "v1.x"
- func: "upload extension"
- name: "build-php-%phpVersion%-lowest"
tags: ["build", "php%phpVersion%", "lowest", "pr", "tag"]
Expand All @@ -14,7 +17,9 @@
PHP_VERSION: "%phpVersion%"
- func: "compile extension"
vars:
EXTENSION_VERSION: "1.20.0"
# TODO: change to "EXTENSION_VERSION: 1.21.0" once 1.21.0 is released
# EXTENSION_VERSION: "1.21.0"
EXTENSION_BRANCH: "v1.x"
- func: "upload extension"
- name: "build-php-%phpVersion%-next-stable"
tags: ["build", "php%phpVersion%", "next-stable", "pr", "tag"]
Expand All @@ -24,7 +29,9 @@
PHP_VERSION: "%phpVersion%"
- func: "compile extension"
vars:
EXTENSION_BRANCH: "v1.20"
# TODO: change to "v1.21" once 1.21.0 is released
# EXTENSION_BRANCH: "v1.21"
EXTENSION_BRANCH: "v1.x"
- func: "upload extension"
- name: "build-php-%phpVersion%-next-minor"
tags: ["build", "php%phpVersion%", "next-minor"]
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ on:

env:
PHP_VERSION: "8.2"
DRIVER_VERSION: "stable"
# TODO: change to "stable" once 1.21.0 is released
# DRIVER_VERSION: "stable"
DRIVER_VERSION: "mongodb/[email protected]"

jobs:
phpcs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ on:

env:
PHP_VERSION: "8.2"
# TODO: change to "stable" once 1.20.0 is released
# TODO: change to "stable" once 1.21.0 is released
# DRIVER_VERSION: "stable"
DRIVER_VERSION: "mongodb/mongo-php-driver@v1.20"
DRIVER_VERSION: "mongodb/mongo-php-driver@v1.x"

jobs:
psalm:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ on:

env:
PHP_VERSION: "8.2"
DRIVER_VERSION: "stable"
# TODO: change to "stable" once 1.21.0 is released
# DRIVER_VERSION: "stable"
DRIVER_VERSION: "mongodb/[email protected]"

jobs:
psalm:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ on:
- "feature/*"

env:
DRIVER_VERSION: "stable"
# TODO: change to "stable" once 1.21.0 is released
# DRIVER_VERSION: "stable"
DRIVER_VERSION: "mongodb/[email protected]"

jobs:
phpunit:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"php": "^8.1",
"ext-hash": "*",
"ext-json": "*",
"ext-mongodb": "^1.20.0",
"ext-mongodb": "^1.21.0",
"composer-runtime-api": "^2.0",
"psr/log": "^1.1.4|^2|^3",
"symfony/polyfill-php80": "^1.27",
Expand Down
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
2 changes: 2 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@
<code><![CDATA[($value is NativeType ? BSONType : $value)]]></code>
<code><![CDATA[($value is NativeType ? BSONType : $value)]]></code>
<code><![CDATA[($value is NativeType ? BSONType : $value)]]></code>
<code><![CDATA[($value is NativeType ? BSONType : $value)]]></code>
<code><![CDATA[($value is NativeType ? BSONType : $value)]]></code>
</InvalidReturnType>
<MixedArgumentTypeCoercion>
<code><![CDATA[$value]]></code>
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