diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index be19e5e..0054fa4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - php: [8.0, 8.1] + php: [8.1, 8.2, 8.3, 8.4] steps: - name: Checkout code diff --git a/composer.json b/composer.json index 3e5848d..2e57567 100644 --- a/composer.json +++ b/composer.json @@ -12,8 +12,8 @@ ], "minimum-stability": "RC", "require": { - "php": "^8.0", - "codeception/codeception": "^5.0", + "php": "^8.1", + "codeception/codeception": "^5.0.8", "mongodb/mongodb": "^1.12" }, "autoload": { @@ -25,6 +25,7 @@ "classmap-authoritative": true }, "require-dev": { - "codeception/stub": "^4.0" + "codeception/stub": "^4.0", + "behat/gherkin": "^4.12" } } diff --git a/readme.md b/readme.md index ff01027..e03948e 100644 --- a/readme.md +++ b/readme.md @@ -15,7 +15,7 @@ composer require "codeception/module-mongodb" --dev ## Requirements -* `PHP 8.0` or higher. +* `PHP 8.1` or higher. ## Documentation diff --git a/src/Codeception/Lib/Driver/MongoDb.php b/src/Codeception/Lib/Driver/MongoDb.php index 101fa6b..24c5521 100644 --- a/src/Codeception/Lib/Driver/MongoDb.php +++ b/src/Codeception/Lib/Driver/MongoDb.php @@ -112,7 +112,7 @@ public function cleanup(): void public function load(string $dumpFile): void { $cmd = sprintf( - 'mongo %s %s%s', + 'mongosh %s %s%s', $this->host . '/' . $this->dbName, $this->createUserPasswordCmdString(), escapeshellarg($dumpFile) diff --git a/tests/unit/Codeception/Module/MongoDbTest.php b/tests/unit/Codeception/Module/MongoDbTest.php index 443e7ff..6c119fc 100644 --- a/tests/unit/Codeception/Module/MongoDbTest.php +++ b/tests/unit/Codeception/Module/MongoDbTest.php @@ -41,7 +41,7 @@ protected function _setUp() $this->markTestSkipped('MongoDB is not installed'); } - $cleanupDirty = in_array('cleanup-dirty', $this->getGroups()); + $cleanupDirty = in_array('cleanup-dirty', $this->groups()); $config = $this->mongoConfig + ['cleanup' => $cleanupDirty ? 'dirty' : true]; $client = new \MongoDB\Client();