Skip to content

Commit 33a9d71

Browse files
authored
Merge pull request #861 from doctrine/5.0.x-merge-up-into-5.1.x_NmsNxPg0
Merge release 5.0.2 into 5.1.x
2 parents 1399887 + d891c8d commit 33a9d71

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ on:
1111
jobs:
1212
coding-standards:
1313
name: "Coding Standards"
14-
uses: "doctrine/.github/.github/workflows/coding-standards.yml@5.0.1"
14+
uses: "doctrine/.github/.github/workflows/coding-standards.yml@5.2.0"

.github/workflows/composer-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ on:
1515
jobs:
1616
composer-lint:
1717
name: "Composer Lint"
18-
uses: "doctrine/.github/.github/workflows/composer-lint.yml@5.0.1"
18+
uses: "doctrine/.github/.github/workflows/composer-lint.yml@5.2.0"

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
- name: "Upload coverage file"
9696
uses: "actions/upload-artifact@v4"
9797
with:
98-
name: "phpunit-${{ matrix.php-version }}-${{ hashFiles(composer.lock) }}.coverage"
98+
name: "phpunit-${{ matrix.php-version }}-${{ hashFiles('composer.lock') }}.coverage"
9999
path: "coverage.xml"
100100

101101
upload_coverage:

.github/workflows/release-on-milestone-closed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
release:
1010
name: "Git tag, release & create merge-up PR"
11-
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@5.0.1"
11+
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@5.2.0"
1212
secrets:
1313
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
1414
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}

README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Compatibility
1414

1515
The current version of this bundle has the following requirements:
1616
* PHP 8.1 or newer is required
17-
* `ext-mongodb` 1.5 or newer
17+
* `ext-mongodb` 1.16 or newer
1818
* Symfony 6.4 or newer is required
1919

2020
Support for older Symfony, PHP and MongoDB versions is provided via the `4.7.x`

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"homepage": "http://www.doctrine-project.org",
2626
"require": {
2727
"php": "^8.1",
28-
"ext-mongodb": "^1.5",
28+
"ext-mongodb": "^1.16",
2929
"composer-runtime-api": "^2.0",
3030
"doctrine/mongodb-odm": "^2.6",
3131
"doctrine/persistence": "^3.0",
@@ -50,7 +50,7 @@
5050
"symfony/stopwatch": "^6.4 || ^7.0",
5151
"symfony/validator": "^6.4 || ^7.0",
5252
"symfony/yaml": "^6.4 || ^7.0",
53-
"vimeo/psalm": "^5.12"
53+
"vimeo/psalm": "^5.25"
5454
},
5555
"conflict": {
5656
"doctrine/data-fixtures": "<1.3"

src/DataCollector/CommandDataCollector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Doctrine\ODM\MongoDB\APM\Command;
88
use Doctrine\ODM\MongoDB\APM\CommandLogger;
9+
use MongoDB\BSON\Document;
910
use stdClass;
1011
use Symfony\Component\HttpFoundation\Request;
1112
use Symfony\Component\HttpFoundation\Response;
@@ -16,8 +17,6 @@
1617
use function array_reduce;
1718
use function count;
1819
use function json_decode;
19-
use function MongoDB\BSON\fromPHP;
20-
use function MongoDB\BSON\toCanonicalExtendedJSON;
2120

2221
/** @internal */
2322
final class CommandDataCollector extends DataCollector
@@ -33,10 +32,11 @@ public function collect(Request $request, Response $response, ?Throwable $except
3332
'commands' => array_map(
3433
static function (Command $command): array {
3534
$dbProperty = '$db';
35+
$document = Document::fromPHP($command->getCommand());
3636

3737
return [
3838
'database' => $command->getCommand()->$dbProperty ?? '',
39-
'command' => json_decode(toCanonicalExtendedJSON(fromPHP($command->getCommand()))),
39+
'command' => json_decode($document->toCanonicalExtendedJSON()),
4040
'durationMicros' => $command->getDurationMicros(),
4141
];
4242
},

0 commit comments

Comments
 (0)