Skip to content

Commit

Permalink
Merge pull request #861 from doctrine/5.0.x-merge-up-into-5.1.x_NmsNxPg0
Browse files Browse the repository at this point in the history
Merge release 5.0.2 into 5.1.x
  • Loading branch information
alcaeus authored Nov 4, 2024
2 parents 1399887 + d891c8d commit 33a9d71
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ on:
jobs:
coding-standards:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@5.0.1"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@5.2.0"
2 changes: 1 addition & 1 deletion .github/workflows/composer-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ on:
jobs:
composer-lint:
name: "Composer Lint"
uses: "doctrine/.github/.github/workflows/composer-lint.yml@5.0.1"
uses: "doctrine/.github/.github/workflows/composer-lint.yml@5.2.0"
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- name: "Upload coverage file"
uses: "actions/upload-artifact@v4"
with:
name: "phpunit-${{ matrix.php-version }}-${{ hashFiles(composer.lock) }}.coverage"
name: "phpunit-${{ matrix.php-version }}-${{ hashFiles('composer.lock') }}.coverage"
path: "coverage.xml"

upload_coverage:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
release:
name: "Git tag, release & create merge-up PR"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@5.0.1"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@5.2.0"
secrets:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
Expand Down
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Compatibility

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

Support for older Symfony, PHP and MongoDB versions is provided via the `4.7.x`
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"homepage": "http://www.doctrine-project.org",
"require": {
"php": "^8.1",
"ext-mongodb": "^1.5",
"ext-mongodb": "^1.16",
"composer-runtime-api": "^2.0",
"doctrine/mongodb-odm": "^2.6",
"doctrine/persistence": "^3.0",
Expand All @@ -50,7 +50,7 @@
"symfony/stopwatch": "^6.4 || ^7.0",
"symfony/validator": "^6.4 || ^7.0",
"symfony/yaml": "^6.4 || ^7.0",
"vimeo/psalm": "^5.12"
"vimeo/psalm": "^5.25"
},
"conflict": {
"doctrine/data-fixtures": "<1.3"
Expand Down
6 changes: 3 additions & 3 deletions src/DataCollector/CommandDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Doctrine\ODM\MongoDB\APM\Command;
use Doctrine\ODM\MongoDB\APM\CommandLogger;
use MongoDB\BSON\Document;
use stdClass;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
Expand All @@ -16,8 +17,6 @@
use function array_reduce;
use function count;
use function json_decode;
use function MongoDB\BSON\fromPHP;
use function MongoDB\BSON\toCanonicalExtendedJSON;

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

return [
'database' => $command->getCommand()->$dbProperty ?? '',
'command' => json_decode(toCanonicalExtendedJSON(fromPHP($command->getCommand()))),
'command' => json_decode($document->toCanonicalExtendedJSON()),
'durationMicros' => $command->getDurationMicros(),
];
},
Expand Down

0 comments on commit 33a9d71

Please sign in to comment.