diff --git a/composer.lock b/composer.lock index d0157d06b9..8b09561f0d 100644 --- a/composer.lock +++ b/composer.lock @@ -609,16 +609,16 @@ }, { "name": "google/protobuf", - "version": "v5.36.0", + "version": "v5.36.1", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "9c105104b54709ecd902494ab340ed2122789b2d" + "reference": "d64d16befba8632967f604b9644c0bb8f64cfbc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/9c105104b54709ecd902494ab340ed2122789b2d", - "reference": "9c105104b54709ecd902494ab340ed2122789b2d", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/d64d16befba8632967f604b9644c0bb8f64cfbc3", + "reference": "d64d16befba8632967f604b9644c0bb8f64cfbc3", "shasum": "" }, "require": { @@ -647,9 +647,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v5.36.0" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v5.36.1" }, - "time": "2026-08-20T13:06:50+00:00" + "time": "2026-08-31T22:07:31+00:00" }, { "name": "halaxa/json-machine", @@ -2289,16 +2289,16 @@ }, { "name": "symfony/http-client", - "version": "v7.4.17", + "version": "v7.4.18", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "d0aca330a822fe40376cd04c335cb48a24743d0c" + "reference": "68d81f78d127984ff2e741f0e0d9cb1078f8f3ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/d0aca330a822fe40376cd04c335cb48a24743d0c", - "reference": "d0aca330a822fe40376cd04c335cb48a24743d0c", + "url": "https://api.github.com/repos/symfony/http-client/zipball/68d81f78d127984ff2e741f0e0d9cb1078f8f3ea", + "reference": "68d81f78d127984ff2e741f0e0d9cb1078f8f3ea", "shasum": "" }, "require": { @@ -2366,7 +2366,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.4.17" + "source": "https://github.com/symfony/http-client/tree/v7.4.18" }, "funding": [ { @@ -2386,20 +2386,20 @@ "type": "tidelift" } ], - "time": "2026-08-21T17:40:08+00:00" + "time": "2026-08-30T13:49:59+00:00" }, { "name": "symfony/http-client-contracts", - "version": "v3.7.1", + "version": "v3.7.3", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "41fc42d276aeff21192465331ebbab7d83a743c0" + "reference": "35be0019e2c2c9fba80f9dc033290a5240f7b44f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/41fc42d276aeff21192465331ebbab7d83a743c0", - "reference": "41fc42d276aeff21192465331ebbab7d83a743c0", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/35be0019e2c2c9fba80f9dc033290a5240f7b44f", + "reference": "35be0019e2c2c9fba80f9dc033290a5240f7b44f", "shasum": "" }, "require": { @@ -2448,7 +2448,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.7.1" + "source": "https://github.com/symfony/http-client-contracts/tree/v3.7.3" }, "funding": [ { @@ -2468,7 +2468,7 @@ "type": "tidelift" } ], - "time": "2026-06-05T06:23:12+00:00" + "time": "2026-08-04T08:41:16+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -2797,16 +2797,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.7.1", + "version": "v3.7.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0" + "reference": "15e6a07ec2a2c75ceb1b21dd98105ee8456d2257" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/c0a284bab1ed8aa0417e3d69250ab437739563a0", - "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/15e6a07ec2a2c75ceb1b21dd98105ee8456d2257", + "reference": "15e6a07ec2a2c75ceb1b21dd98105ee8456d2257", "shasum": "" }, "require": { @@ -2860,7 +2860,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.7.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.7.3" }, "funding": [ { @@ -2880,7 +2880,7 @@ "type": "tidelift" } ], - "time": "2026-06-16T09:55:08+00:00" + "time": "2026-07-27T15:39:01+00:00" }, { "name": "tbachert/spi", @@ -3636,16 +3636,16 @@ }, { "name": "utopia-php/database", - "version": "7.3.1", + "version": "7.3.4", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "8c0f55a9913c4381aeae27ab25fc513dfdfc20b8" + "reference": "debef429479c86d8b5610a32e390651855131e7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/8c0f55a9913c4381aeae27ab25fc513dfdfc20b8", - "reference": "8c0f55a9913c4381aeae27ab25fc513dfdfc20b8", + "url": "https://api.github.com/repos/utopia-php/database/zipball/debef429479c86d8b5610a32e390651855131e7d", + "reference": "debef429479c86d8b5610a32e390651855131e7d", "shasum": "" }, "require": { @@ -3690,9 +3690,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/7.3.1" + "source": "https://github.com/utopia-php/database/tree/7.3.4" }, - "time": "2026-08-27T05:56:47+00:00" + "time": "2026-09-01T06:40:07+00:00" }, { "name": "utopia-php/detector", @@ -4674,16 +4674,16 @@ }, { "name": "utopia-php/queue", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/utopia-php/queue.git", - "reference": "d757033a1fba2a1c0d7e403c488d6bab4e2ef90a" + "reference": "4cdaf1b193db4934a65720ecd3be9bf109821cfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/d757033a1fba2a1c0d7e403c488d6bab4e2ef90a", - "reference": "d757033a1fba2a1c0d7e403c488d6bab4e2ef90a", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/4cdaf1b193db4934a65720ecd3be9bf109821cfd", + "reference": "4cdaf1b193db4934a65720ecd3be9bf109821cfd", "shasum": "" }, "require": { @@ -4734,9 +4734,9 @@ ], "support": { "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/1.5.1" + "source": "https://github.com/utopia-php/queue/tree/1.5.2" }, - "time": "2026-08-27T06:13:20+00:00" + "time": "2026-08-28T13:38:02+00:00" }, { "name": "utopia-php/registry", @@ -5140,16 +5140,16 @@ }, { "name": "utopia-php/usage", - "version": "0.15.0", + "version": "0.15.2", "source": { "type": "git", "url": "https://github.com/utopia-php/usage.git", - "reference": "e710b16a08a9dc184906c5b8cf698546238c7be0" + "reference": "0f56f67eeb8b47e3ca53402bc1747c3fdc213db9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/usage/zipball/e710b16a08a9dc184906c5b8cf698546238c7be0", - "reference": "e710b16a08a9dc184906c5b8cf698546238c7be0", + "url": "https://api.github.com/repos/utopia-php/usage/zipball/0f56f67eeb8b47e3ca53402bc1747c3fdc213db9", + "reference": "0f56f67eeb8b47e3ca53402bc1747c3fdc213db9", "shasum": "" }, "require": { @@ -5187,9 +5187,9 @@ "description": "Light and Fast Usage library", "support": { "issues": "https://github.com/utopia-php/usage/issues", - "source": "https://github.com/utopia-php/usage/tree/0.15.0" + "source": "https://github.com/utopia-php/usage/tree/0.15.2" }, - "time": "2026-08-25T05:10:14+00:00" + "time": "2026-08-31T03:14:24+00:00" }, { "name": "utopia-php/user-agent", @@ -5275,16 +5275,16 @@ }, { "name": "utopia-php/vcs", - "version": "5.2.4", + "version": "5.2.5", "source": { "type": "git", "url": "https://github.com/utopia-php/vcs.git", - "reference": "b66555692fb8ac41d9e36c7e0929522cca439d4b" + "reference": "8e353113381328489b9a9a736156758c642c875c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/vcs/zipball/b66555692fb8ac41d9e36c7e0929522cca439d4b", - "reference": "b66555692fb8ac41d9e36c7e0929522cca439d4b", + "url": "https://api.github.com/repos/utopia-php/vcs/zipball/8e353113381328489b9a9a736156758c642c875c", + "reference": "8e353113381328489b9a9a736156758c642c875c", "shasum": "" }, "require": { @@ -5326,10 +5326,10 @@ "vcs" ], "support": { - "source": "https://github.com/utopia-php/vcs/tree/5.2.4", + "source": "https://github.com/utopia-php/vcs/tree/5.2.5", "issues": "https://github.com/utopia-php/vcs/issues" }, - "time": "2026-08-21T13:45:11+00:00" + "time": "2026-08-25T09:26:43+00:00" }, { "name": "utopia-php/websocket", @@ -5522,16 +5522,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "4.5.0", + "version": "4.7.6", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "63c54079505d03b7ec9887c5d6afb629a2f5820b" + "reference": "3a6e28f03ccdeadae79c6de5ec5c8a652a094226" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/63c54079505d03b7ec9887c5d6afb629a2f5820b", - "reference": "63c54079505d03b7ec9887c5d6afb629a2f5820b", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/3a6e28f03ccdeadae79c6de5ec5c8a652a094226", + "reference": "3a6e28f03ccdeadae79c6de5ec5c8a652a094226", "shasum": "" }, "require": { @@ -5568,9 +5568,9 @@ "description": "SDK generator for Appwrite APIs across multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/4.5.0" + "source": "https://github.com/appwrite/sdk-generator/tree/4.7.6" }, - "time": "2026-08-25T03:32:42+00:00" + "time": "2026-08-31T20:15:18+00:00" }, { "name": "brianium/paratest", @@ -6280,11 +6280,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.2.9", + "version": "2.2.12", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/13d6b4f347bad222da436580c8304fa6f83e6bd0", - "reference": "13d6b4f347bad222da436580c8304fa6f83e6bd0", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/174b0d88710f00a42598886504dd7a146f91ace5", + "reference": "174b0d88710f00a42598886504dd7a146f91ace5", "shasum": "" }, "require": { @@ -6340,7 +6340,7 @@ "type": "github" } ], - "time": "2026-08-22T07:38:16+00:00" + "time": "2026-08-31T19:09:43+00:00" }, { "name": "phpunit/php-code-coverage", @@ -6432,23 +6432,23 @@ }, { "name": "phpunit/php-file-iterator", - "version": "6.0.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5" + "reference": "a248d1640ab059b075f53a2ef0f9856e864e06b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5", - "reference": "3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a248d1640ab059b075f53a2ef0f9856e864e06b5", + "reference": "a248d1640ab059b075f53a2ef0f9856e864e06b5", "shasum": "" }, "require": { "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.33" }, "type": "library", "extra": { @@ -6481,7 +6481,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.2" }, "funding": [ { @@ -6501,7 +6501,7 @@ "type": "tidelift" } ], - "time": "2026-02-02T14:04:18+00:00" + "time": "2026-08-25T14:40:53+00:00" }, { "name": "phpunit/php-invoker", @@ -6689,16 +6689,16 @@ }, { "name": "phpunit/phpunit", - "version": "12.5.33", + "version": "12.5.34", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b98e028a26c5c5ba7e4a54be96ccf35f2914d184" + "reference": "6cbff63d670de92cb1cb3d2ff9f40327e9da9c7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b98e028a26c5c5ba7e4a54be96ccf35f2914d184", - "reference": "b98e028a26c5c5ba7e4a54be96ccf35f2914d184", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6cbff63d670de92cb1cb3d2ff9f40327e9da9c7f", + "reference": "6cbff63d670de92cb1cb3d2ff9f40327e9da9c7f", "shasum": "" }, "require": { @@ -6708,18 +6708,18 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.13.4", + "myclabs/deep-copy": "^1.14.0", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.3", "phpunit/php-code-coverage": "^12.5.7", - "phpunit/php-file-iterator": "^6.0.1", + "phpunit/php-file-iterator": "^6.0.2", "phpunit/php-invoker": "^6.0.0", "phpunit/php-text-template": "^5.0.0", "phpunit/php-timer": "^8.0.0", "sebastian/cli-parser": "^4.2.1", "sebastian/comparator": "^7.1.8", - "sebastian/diff": "^7.0.0", + "sebastian/diff": "^7.0.1", "sebastian/environment": "^8.1.2", "sebastian/exporter": "^7.0.3", "sebastian/global-state": "^8.0.3", @@ -6767,7 +6767,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.33" + "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.34" }, "funding": [ { @@ -6775,25 +6775,25 @@ "type": "other" } ], - "time": "2026-07-28T13:58:09+00:00" + "time": "2026-08-27T08:38:28+00:00" }, { "name": "rector/rector", - "version": "2.6.3", + "version": "2.6.5", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "7e46709996a4b3dc59e1d6ecbb6a38ace335bd58" + "reference": "f8686605798c755456327a3597201c3b5be76294" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/7e46709996a4b3dc59e1d6ecbb6a38ace335bd58", - "reference": "7e46709996a4b3dc59e1d6ecbb6a38ace335bd58", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/f8686605798c755456327a3597201c3b5be76294", + "reference": "f8686605798c755456327a3597201c3b5be76294", "shasum": "" }, "require": { "php": "^7.4|^8.0", - "phpstan/phpstan": "^2.2.6" + "phpstan/phpstan": "^2.2.10" }, "conflict": { "rector/rector-doctrine": "*", @@ -6801,9 +6801,6 @@ "rector/rector-phpunit": "*", "rector/rector-symfony": "*" }, - "suggest": { - "ext-dom": "To manipulate phpunit.xml via the custom-rule command" - }, "bin": [ "bin/rector" ], @@ -6827,7 +6824,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/2.6.3" + "source": "https://github.com/rectorphp/rector/tree/2.6.5" }, "funding": [ { @@ -6835,7 +6832,7 @@ "type": "github" } ], - "time": "2026-08-18T22:01:18+00:00" + "time": "2026-08-30T22:02:04+00:00" }, { "name": "sebastian/cli-parser", @@ -7058,24 +7055,24 @@ }, { "name": "sebastian/diff", - "version": "7.0.0", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f" + "reference": "cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7ab1ea946c012266ca32390913653d844ecd085f", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6", + "reference": "cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6", "shasum": "" }, "require": { "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0", - "symfony/process": "^7.2" + "phpunit/phpunit": "^12.5.33", + "symfony/process": "^7.4.17" }, "type": "library", "extra": { @@ -7113,15 +7110,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/7.0.0" + "source": "https://github.com/sebastianbergmann/diff/tree/7.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/diff", + "type": "tidelift" } ], - "time": "2025-02-07T04:55:46+00:00" + "time": "2026-08-25T15:35:54+00:00" }, { "name": "sebastian/environment", @@ -7909,16 +7918,16 @@ }, { "name": "symfony/console", - "version": "v8.1.5", + "version": "v8.1.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d07c06839e33047e2c894a6793248f3fb66c8129" + "reference": "eb7d9957d66739649e931ce7a9d05dab69f8abac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d07c06839e33047e2c894a6793248f3fb66c8129", - "reference": "d07c06839e33047e2c894a6793248f3fb66c8129", + "url": "https://api.github.com/repos/symfony/console/zipball/eb7d9957d66739649e931ce7a9d05dab69f8abac", + "reference": "eb7d9957d66739649e931ce7a9d05dab69f8abac", "shasum": "" }, "require": { @@ -7985,7 +7994,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.1.5" + "source": "https://github.com/symfony/console/tree/v8.1.6" }, "funding": [ { @@ -8005,7 +8014,7 @@ "type": "tidelift" } ], - "time": "2026-08-21T14:29:57+00:00" + "time": "2026-08-25T14:18:42+00:00" }, { "name": "symfony/polyfill-ctype", @@ -8259,7 +8268,7 @@ }, { "name": "symfony/process", - "version": "v8.1.5", + "version": "v8.1.6", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -8300,7 +8309,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v8.1.5" + "source": "https://github.com/symfony/process/tree/v8.1.6" }, "funding": [ { @@ -8657,5 +8666,5 @@ "platform-dev": { "ext-fileinfo": "*" }, - "plugin-api-version": "2.9.0" + "plugin-api-version": "2.6.0" } diff --git a/src/Appwrite/Platform/Workers/Executions.php b/src/Appwrite/Platform/Workers/Executions.php index 4e65586541..1142904ebb 100644 --- a/src/Appwrite/Platform/Workers/Executions.php +++ b/src/Appwrite/Platform/Workers/Executions.php @@ -107,7 +107,9 @@ class Executions extends Action if ($this->isPending($execution)) { $this->create($dbForProject, $execution); } else { - $dbForProject->upsertDocument('executions', $execution); + // upsertDocuments without a callback skips the sequence fetch that + // upsertDocument always pays for; nothing here reads the result back. + $dbForProject->upsertDocuments('executions', [$execution]); } } } diff --git a/tests/unit/Platform/Workers/ExecutionsTest.php b/tests/unit/Platform/Workers/ExecutionsTest.php index 21757d6aa6..4603dd027d 100644 --- a/tests/unit/Platform/Workers/ExecutionsTest.php +++ b/tests/unit/Platform/Workers/ExecutionsTest.php @@ -28,7 +28,7 @@ final class ExecutionsTest extends TestCase $created = $execution; return $execution; }); - $dbForProject->expects($this->never())->method('upsertDocument'); + $dbForProject->expects($this->never())->method('upsertDocuments'); (new Executions())->action( $this->message((new Execution( @@ -48,7 +48,7 @@ final class ExecutionsTest extends TestCase $dbForProject->expects($this->once()) ->method('createDocument') ->willThrowException(new Duplicate('Execution already exists')); - $dbForProject->expects($this->never())->method('upsertDocument'); + $dbForProject->expects($this->never())->method('upsertDocuments'); (new Executions())->action( $this->message((new Execution( @@ -65,11 +65,19 @@ final class ExecutionsTest extends TestCase $dbForProject = $this->createMock(Database::class); $dbForProject->expects($this->never())->method('createDocument'); $dbForProject->expects($this->once()) - ->method('upsertDocument') - ->with('executions', $this->isInstanceOf(Document::class)) - ->willReturnCallback(function (string $collection, Document $execution) use (&$upserted): Document { - $upserted = $execution; - return $execution; + ->method('upsertDocuments') + ->with('executions', $this->isArray()) + ->willReturnCallback(function ( + string $collection, + array $executions, + int $batchSize = 0, + ?callable $onNext = null, + ?callable $onError = null + ) use (&$upserted): int { + // No callback is passed, so the write skips the sequence fetch. + $this->assertNull($onNext); + $upserted = $executions[0]; + return \count($executions); }); (new Executions())->action(