From 214dd326ed6118908ef20f9e7295174c33bce20f Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Tue, 18 Mar 2025 19:36:40 -0500 Subject: [PATCH 1/2] Support version 2.0 of the MongoDB driver --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index cba6e6b..a5a803e 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,8 @@ ], "require": { "php": ">=8.1", - "ext-mongodb": "^1.21", - "mongodb/mongodb": "^1.21", + "ext-mongodb": "^1.21 || ^2.0@dev", + "mongodb/mongodb": "^1.21 || ^2.0@dev", "symfony/config": "^6.3 || ^7.0", "symfony/console": "^6.3 || ^7.0", "symfony/dependency-injection": "^6.3.5 || ^7.0", From 02854cb5517de868bb10a766c6acc8d7411e9a6e Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Fri, 21 Mar 2025 09:51:49 +0100 Subject: [PATCH 2/2] Test with driver version 2.x in CI --- .github/workflows/ci.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 10fdd38..4756bda 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ permissions: jobs: test: - name: PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }} + ${{ matrix.variant }} + name: PHP ${{ matrix.php-version }} + ${{ matrix.driver-version }} + ${{ matrix.dependencies }} + ${{ matrix.variant }} runs-on: ubuntu-latest @@ -46,6 +46,8 @@ jobs: - '8.2' - '8.3' - '8.4' + driver-version: + - 'stable' dependencies: - 'highest' - 'lowest' @@ -56,6 +58,12 @@ jobs: - 'symfony/symfony:"6.3.*"' - 'symfony/symfony:"6.4.*"' - 'symfony/symfony:"7.0.*"' + include: + - php-version: '8.4' + driver-version: 'mongodb/mongo-php-driver@v2.x' + dependencies: 'highest' + symfony-require: '' + variant: 'normal' steps: - name: Checkout @@ -65,6 +73,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} + extensions: "mongodb-${{ matrix.driver-version }}" - name: Add PHPUnit matcher run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"