diff --git a/composer.lock b/composer.lock index eef19b4a29..93d5777530 100644 --- a/composer.lock +++ b/composer.lock @@ -1095,16 +1095,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.25", + "version": "9.5.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d" + "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", - "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/851867efcbb6a1b992ec515c71cdcf20d895e9d2", + "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2", "shasum": "" }, "require": { @@ -1177,7 +1177,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.26" }, "funding": [ { @@ -1193,7 +1193,7 @@ "type": "tidelift" } ], - "time": "2022-09-25T03:44:45+00:00" + "time": "2022-10-28T06:00:21+00:00" }, { "name": "psr/container", @@ -2382,5 +2382,5 @@ "ext-mongodb": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/src/Adapter.php b/src/Adapter.php new file mode 100644 index 0000000000..521b01ca51 --- /dev/null +++ b/src/Adapter.php @@ -0,0 +1,15 @@ +id = uniqid('utopia.mongo.client'); $this->database = $database; $this->host = $host; $this->port = $port; - - $this->client = $useCoroutine - ? new CoroutineClient(SWOOLE_SOCK_TCP | SWOOLE_KEEP) - : new SwooleClient(SWOOLE_SOCK_TCP | SWOOLE_KEEP); + $this->client = $adapter; $this->auth = new Auth([ 'authcid' => $user,