From 1854d01e6e580e1056f74c540bdfd73ad7abceae Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 2 Feb 2026 06:13:00 +0000 Subject: [PATCH 01/11] chore: upgrade utopia-php dependencies for cache reconnection support --- composer.json | 18 +++--- composer.lock | 164 ++++++++++++++++++++++++++------------------------ 2 files changed, 94 insertions(+), 88 deletions(-) diff --git a/composer.json b/composer.json index 4d9e779c94..9dc359a102 100644 --- a/composer.json +++ b/composer.json @@ -45,18 +45,18 @@ "ext-sockets": "*", "appwrite/php-runtimes": "0.19.*", "appwrite/php-clamav": "2.0.*", - "utopia-php/abuse": "1.*", + "utopia-php/abuse": "dev-chore-upgrade-database-5", "utopia-php/analytics": "0.10.*", - "utopia-php/audit": "2.*", + "utopia-php/audit": "dev-chore-upgrade-database-5", "utopia-php/auth": "0.5.*", - "utopia-php/cache": "0.13.*", + "utopia-php/cache": "1.0.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "1.*", - "utopia-php/database": "4.*", + "utopia-php/database": "5.*", "utopia-php/detector": "0.2.*", - "utopia-php/domains": "0.11.*", - "utopia-php/emails": "0.6.*", - "utopia-php/dns": "1.5.*", + "utopia-php/domains": "1.*", + "utopia-php/emails": "dev-chore-upgrade-domains-1", + "utopia-php/dns": "dev-chore-upgrade-domains-1", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", "utopia-php/fetch": "0.5.*", @@ -64,7 +64,7 @@ "utopia-php/locale": "0.8.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.20.*", - "utopia-php/migration": "1.*", + "utopia-php/migration": "dev-chore-upgrade-database-5", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "1.*", @@ -75,7 +75,7 @@ "utopia-php/swoole": "1.*", "utopia-php/system": "0.9.*", "utopia-php/telemetry": "0.1.*", - "utopia-php/vcs": "0.13.*", + "utopia-php/vcs": "1.*", "utopia-php/websocket": "0.3.*", "matomo/device-detector": "6.4.*", "dragonmantank/cron-expression": "3.4.*", diff --git a/composer.lock b/composer.lock index c29c66e759..56da13dece 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2aca1c8eeaa9fa338e389e3527cb6bd6", + "content-hash": "15766c9e6f5480b6e07d9f3b0f075397", "packages": [ { "name": "adhocore/jwt", @@ -283,16 +283,16 @@ }, { "name": "brick/math", - "version": "0.14.1", + "version": "0.14.3", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "f05858549e5f9d7bb45875a75583240a38a281d0" + "reference": "6af96b11de3f7d99730c118c200418c48274edb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/f05858549e5f9d7bb45875a75583240a38a281d0", - "reference": "f05858549e5f9d7bb45875a75583240a38a281d0", + "url": "https://api.github.com/repos/brick/math/zipball/6af96b11de3f7d99730c118c200418c48274edb4", + "reference": "6af96b11de3f7d99730c118c200418c48274edb4", "shasum": "" }, "require": { @@ -331,7 +331,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.14.1" + "source": "https://github.com/brick/math/tree/0.14.3" }, "funding": [ { @@ -339,7 +339,7 @@ "type": "github" } ], - "time": "2025-11-24T14:40:29+00:00" + "time": "2026-02-01T15:18:05+00:00" }, { "name": "chillerlan/php-qrcode", @@ -756,16 +756,16 @@ }, { "name": "google/protobuf", - "version": "v4.33.4", + "version": "v4.33.5", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "22d28025cda0d223a2e48c2e16c5284ecc9f5402" + "reference": "ebe8010a61b2ae0cff0d246fe1c4d44e9f7dfa6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/22d28025cda0d223a2e48c2e16c5284ecc9f5402", - "reference": "22d28025cda0d223a2e48c2e16c5284ecc9f5402", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/ebe8010a61b2ae0cff0d246fe1c4d44e9f7dfa6d", + "reference": "ebe8010a61b2ae0cff0d246fe1c4d44e9f7dfa6d", "shasum": "" }, "require": { @@ -794,9 +794,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.33.4" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.33.5" }, - "time": "2026-01-12T17:58:43+00:00" + "time": "2026-01-29T20:49:00+00:00" }, { "name": "halaxa/json-machine", @@ -3517,16 +3517,16 @@ }, { "name": "utopia-php/abuse", - "version": "1.2.1", + "version": "dev-chore-upgrade-database-5", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "15cd5dbefa4453e8a2d90649a7078e242966ac3f" + "reference": "251856e88367fb139e914d7aba46467167fe176b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/15cd5dbefa4453e8a2d90649a7078e242966ac3f", - "reference": "15cd5dbefa4453e8a2d90649a7078e242966ac3f", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/251856e88367fb139e914d7aba46467167fe176b", + "reference": "251856e88367fb139e914d7aba46467167fe176b", "shasum": "" }, "require": { @@ -3535,7 +3535,7 @@ "ext-pdo": "*", "ext-redis": "*", "php": ">=8.0", - "utopia-php/database": "4.*" + "utopia-php/database": "5.*" }, "require-dev": { "laravel/pint": "1.*", @@ -3563,9 +3563,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/1.2.1" + "source": "https://github.com/utopia-php/abuse/tree/chore-upgrade-database-5" }, - "time": "2026-01-15T02:09:49+00:00" + "time": "2026-01-30T17:46:51+00:00" }, { "name": "utopia-php/analytics", @@ -3615,21 +3615,21 @@ }, { "name": "utopia-php/audit", - "version": "2.1.0", + "version": "dev-chore-upgrade-database-5", "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "8e0540aa939968418ee3ad2b2c305992a771e142" + "reference": "33ea392e6579b8ecfe96c1377116021af7c48af0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/8e0540aa939968418ee3ad2b2c305992a771e142", - "reference": "8e0540aa939968418ee3ad2b2c305992a771e142", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/33ea392e6579b8ecfe96c1377116021af7c48af0", + "reference": "33ea392e6579b8ecfe96c1377116021af7c48af0", "shasum": "" }, "require": { "php": ">=8.0", - "utopia-php/database": "4.*", + "utopia-php/database": "5.*", "utopia-php/fetch": "0.5.*", "utopia-php/validators": "0.2.*" }, @@ -3658,9 +3658,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/2.1.0" + "source": "https://github.com/utopia-php/audit/tree/chore-upgrade-database-5" }, - "time": "2026-01-22T12:40:48+00:00" + "time": "2026-01-30T14:09:28+00:00" }, { "name": "utopia-php/auth", @@ -3719,16 +3719,16 @@ }, { "name": "utopia-php/cache", - "version": "0.13.3", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/utopia-php/cache.git", - "reference": "355707ab2c0090435059216165db86976b68a126" + "reference": "7068870c086a6aea16173563a26b93ef3e408439" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cache/zipball/355707ab2c0090435059216165db86976b68a126", - "reference": "355707ab2c0090435059216165db86976b68a126", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/7068870c086a6aea16173563a26b93ef3e408439", + "reference": "7068870c086a6aea16173563a26b93ef3e408439", "shasum": "" }, "require": { @@ -3765,9 +3765,9 @@ ], "support": { "issues": "https://github.com/utopia-php/cache/issues", - "source": "https://github.com/utopia-php/cache/tree/0.13.3" + "source": "https://github.com/utopia-php/cache/tree/1.0.0" }, - "time": "2026-01-16T07:54:34+00:00" + "time": "2026-01-28T10:55:44+00:00" }, { "name": "utopia-php/cli", @@ -3961,27 +3961,27 @@ }, { "name": "utopia-php/database", - "version": "4.6.1", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "8795a7f5bf8828955299ae44e5946f93a2b1bde5" + "reference": "221794bd7de027f9177cd325209e8162ca2520cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/8795a7f5bf8828955299ae44e5946f93a2b1bde5", - "reference": "8795a7f5bf8828955299ae44e5946f93a2b1bde5", + "url": "https://api.github.com/repos/utopia-php/database/zipball/221794bd7de027f9177cd325209e8162ca2520cb", + "reference": "221794bd7de027f9177cd325209e8162ca2520cb", "shasum": "" }, "require": { "ext-mbstring": "*", "ext-mongodb": "*", "ext-pdo": "*", - "php": ">=8.1", - "utopia-php/cache": "0.13.*", + "php": ">=8.4", + "utopia-php/cache": "1.0.*", "utopia-php/framework": "0.33.*", "utopia-php/mongo": "0.11.*", - "utopia-php/pools": "1.*" + "utopia-php/pools": "1.0.*" }, "require-dev": { "fakerphp/faker": "1.23.*", @@ -4013,9 +4013,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/4.6.1" + "source": "https://github.com/utopia-php/database/tree/5.0.0" }, - "time": "2026-01-21T09:37:22+00:00" + "time": "2026-01-30T06:17:53+00:00" }, { "name": "utopia-php/detector", @@ -4064,21 +4064,21 @@ }, { "name": "utopia-php/dns", - "version": "1.5.3", + "version": "dev-chore-upgrade-domains-1", "source": { "type": "git", "url": "https://github.com/utopia-php/dns.git", - "reference": "a1f490ba425b1a5128e7aaa24eff560900812d21" + "reference": "301b8c5b1cf029ed2dc1437a0508d873ef5718f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/dns/zipball/a1f490ba425b1a5128e7aaa24eff560900812d21", - "reference": "a1f490ba425b1a5128e7aaa24eff560900812d21", + "url": "https://api.github.com/repos/utopia-php/dns/zipball/301b8c5b1cf029ed2dc1437a0508d873ef5718f0", + "reference": "301b8c5b1cf029ed2dc1437a0508d873ef5718f0", "shasum": "" }, "require": { "php": ">=8.3", - "utopia-php/domains": "0.11.*", + "utopia-php/domains": "1.0.*", "utopia-php/span": "1.0.*", "utopia-php/telemetry": "*", "utopia-php/validators": "0.*" @@ -4115,27 +4115,27 @@ ], "support": { "issues": "https://github.com/utopia-php/dns/issues", - "source": "https://github.com/utopia-php/dns/tree/1.5.3" + "source": "https://github.com/utopia-php/dns/tree/chore-upgrade-domains-1" }, - "time": "2026-01-13T11:39:38+00:00" + "time": "2026-01-30T14:09:32+00:00" }, { "name": "utopia-php/domains", - "version": "0.11.1", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/utopia-php/domains.git", - "reference": "63fc5b9b58a32a5efd426510bbab4199db24593b" + "reference": "ecac82392e83d4a8ede76c3c94258d868d82f709" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/domains/zipball/63fc5b9b58a32a5efd426510bbab4199db24593b", - "reference": "63fc5b9b58a32a5efd426510bbab4199db24593b", + "url": "https://api.github.com/repos/utopia-php/domains/zipball/ecac82392e83d4a8ede76c3c94258d868d82f709", + "reference": "ecac82392e83d4a8ede76c3c94258d868d82f709", "shasum": "" }, "require": { "php": ">=8.2", - "utopia-php/cache": "0.13.*", + "utopia-php/cache": "1.0.*", "utopia-php/validators": "0.*" }, "require-dev": { @@ -4177,9 +4177,9 @@ ], "support": { "issues": "https://github.com/utopia-php/domains/issues", - "source": "https://github.com/utopia-php/domains/tree/0.11.1" + "source": "https://github.com/utopia-php/domains/tree/1.0.0" }, - "time": "2026-01-23T09:28:08+00:00" + "time": "2026-01-30T06:15:50+00:00" }, { "name": "utopia-php/dsn", @@ -4230,22 +4230,22 @@ }, { "name": "utopia-php/emails", - "version": "0.6.5", + "version": "dev-chore-upgrade-domains-1", "source": { "type": "git", "url": "https://github.com/utopia-php/emails.git", - "reference": "178e57a0f9a24139500c94ce73d166800197b6cf" + "reference": "d7ae7a73e05ae1bc8c6686af90a8f4b354b1fdd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/emails/zipball/178e57a0f9a24139500c94ce73d166800197b6cf", - "reference": "178e57a0f9a24139500c94ce73d166800197b6cf", + "url": "https://api.github.com/repos/utopia-php/emails/zipball/d7ae7a73e05ae1bc8c6686af90a8f4b354b1fdd5", + "reference": "d7ae7a73e05ae1bc8c6686af90a8f4b354b1fdd5", "shasum": "" }, "require": { "php": ">=8.0", "utopia-php/cli": "^0.15", - "utopia-php/domains": "^0.11", + "utopia-php/domains": "^1.0", "utopia-php/fetch": "^0.5", "utopia-php/validators": "0.*" }, @@ -4284,9 +4284,9 @@ ], "support": { "issues": "https://github.com/utopia-php/emails/issues", - "source": "https://github.com/utopia-php/emails/tree/0.6.5" + "source": "https://github.com/utopia-php/emails/tree/chore-upgrade-domains-1" }, - "time": "2026-01-13T09:55:59+00:00" + "time": "2026-01-30T14:09:30+00:00" }, { "name": "utopia-php/fetch", @@ -4578,16 +4578,16 @@ }, { "name": "utopia-php/migration", - "version": "1.4.6", + "version": "dev-chore-upgrade-database-5", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "f358db6fb6a01d855bbed39e283387069e4f277d" + "reference": "afc4eca7d808c360bf2770937f7cc6cbdf9e4ac2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/f358db6fb6a01d855bbed39e283387069e4f277d", - "reference": "f358db6fb6a01d855bbed39e283387069e4f277d", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/afc4eca7d808c360bf2770937f7cc6cbdf9e4ac2", + "reference": "afc4eca7d808c360bf2770937f7cc6cbdf9e4ac2", "shasum": "" }, "require": { @@ -4597,7 +4597,7 @@ "halaxa/json-machine": "^1.2", "php": ">=8.1", "utopia-php/console": "0.0.*", - "utopia-php/database": "4.*", + "utopia-php/database": "5.*", "utopia-php/dsn": "0.2.*", "utopia-php/storage": "0.18.*" }, @@ -4628,9 +4628,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/1.4.6" + "source": "https://github.com/utopia-php/migration/tree/chore-upgrade-database-5" }, - "time": "2026-01-20T11:07:17+00:00" + "time": "2026-01-30T14:09:29+00:00" }, { "name": "utopia-php/mongo", @@ -5323,22 +5323,22 @@ }, { "name": "utopia-php/vcs", - "version": "0.13.0", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/utopia-php/vcs.git", - "reference": "c59e21db5ca42014fe2071fec3c2f814efcc86dd" + "reference": "3a427529dae09c0794541adac19062603d441e28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/vcs/zipball/c59e21db5ca42014fe2071fec3c2f814efcc86dd", - "reference": "c59e21db5ca42014fe2071fec3c2f814efcc86dd", + "url": "https://api.github.com/repos/utopia-php/vcs/zipball/3a427529dae09c0794541adac19062603d441e28", + "reference": "3a427529dae09c0794541adac19062603d441e28", "shasum": "" }, "require": { "adhocore/jwt": "^1.1", "php": ">=8.0", - "utopia-php/cache": "0.13.*", + "utopia-php/cache": "1.0.*", "utopia-php/framework": "0.*.*", "utopia-php/system": "0.9.*" }, @@ -5366,9 +5366,9 @@ ], "support": { "issues": "https://github.com/utopia-php/vcs/issues", - "source": "https://github.com/utopia-php/vcs/tree/0.13.0" + "source": "https://github.com/utopia-php/vcs/tree/1.0.0" }, - "time": "2025-11-28T08:42:31+00:00" + "time": "2026-01-30T06:18:24+00:00" }, { "name": "utopia-php/websocket", @@ -9052,7 +9052,13 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/abuse": 20, + "utopia-php/audit": 20, + "utopia-php/emails": 20, + "utopia-php/dns": 20, + "utopia-php/migration": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -9076,5 +9082,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.9.0" + "plugin-api-version": "2.6.0" } From abb546d0995f92995dcc4f0eb9053d48d9359655 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 2 Feb 2026 11:00:20 +0000 Subject: [PATCH 02/11] chore: replace dev dependencies with stable versions --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 9dc359a102..f8210902ad 100644 --- a/composer.json +++ b/composer.json @@ -45,9 +45,9 @@ "ext-sockets": "*", "appwrite/php-runtimes": "0.19.*", "appwrite/php-clamav": "2.0.*", - "utopia-php/abuse": "dev-chore-upgrade-database-5", + "utopia-php/abuse": "1.2.*", "utopia-php/analytics": "0.10.*", - "utopia-php/audit": "dev-chore-upgrade-database-5", + "utopia-php/audit": "2.2.*", "utopia-php/auth": "0.5.*", "utopia-php/cache": "1.0.*", "utopia-php/cli": "0.15.*", @@ -55,8 +55,8 @@ "utopia-php/database": "5.*", "utopia-php/detector": "0.2.*", "utopia-php/domains": "1.*", - "utopia-php/emails": "dev-chore-upgrade-domains-1", - "utopia-php/dns": "dev-chore-upgrade-domains-1", + "utopia-php/emails": "0.6.*", + "utopia-php/dns": "1.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", "utopia-php/fetch": "0.5.*", @@ -64,7 +64,7 @@ "utopia-php/locale": "0.8.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.20.*", - "utopia-php/migration": "dev-chore-upgrade-database-5", + "utopia-php/migration": "1.5.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "1.*", From a1dad882e429f32ce833594fa28f62771150684b Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 2 Feb 2026 11:02:42 +0000 Subject: [PATCH 03/11] chore: update composer.lock --- composer.lock | 70 +++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/composer.lock b/composer.lock index 56da13dece..c5f32993af 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "15766c9e6f5480b6e07d9f3b0f075397", + "content-hash": "e2308896fe86b2bd967390d250b95bae", "packages": [ { "name": "adhocore/jwt", @@ -3517,16 +3517,16 @@ }, { "name": "utopia-php/abuse", - "version": "dev-chore-upgrade-database-5", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "251856e88367fb139e914d7aba46467167fe176b" + "reference": "20bee84fd14dbe81d50ecabf1ffd81cceca06152" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/251856e88367fb139e914d7aba46467167fe176b", - "reference": "251856e88367fb139e914d7aba46467167fe176b", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/20bee84fd14dbe81d50ecabf1ffd81cceca06152", + "reference": "20bee84fd14dbe81d50ecabf1ffd81cceca06152", "shasum": "" }, "require": { @@ -3563,9 +3563,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/chore-upgrade-database-5" + "source": "https://github.com/utopia-php/abuse/tree/1.2.2" }, - "time": "2026-01-30T17:46:51+00:00" + "time": "2026-02-02T10:43:10+00:00" }, { "name": "utopia-php/analytics", @@ -3615,16 +3615,16 @@ }, { "name": "utopia-php/audit", - "version": "dev-chore-upgrade-database-5", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "33ea392e6579b8ecfe96c1377116021af7c48af0" + "reference": "e3e2d6ad5c7f6377d9237df296a12eb7943892fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/33ea392e6579b8ecfe96c1377116021af7c48af0", - "reference": "33ea392e6579b8ecfe96c1377116021af7c48af0", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/e3e2d6ad5c7f6377d9237df296a12eb7943892fd", + "reference": "e3e2d6ad5c7f6377d9237df296a12eb7943892fd", "shasum": "" }, "require": { @@ -3658,9 +3658,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/chore-upgrade-database-5" + "source": "https://github.com/utopia-php/audit/tree/2.2.1" }, - "time": "2026-01-30T14:09:28+00:00" + "time": "2026-02-02T10:39:25+00:00" }, { "name": "utopia-php/auth", @@ -4064,16 +4064,16 @@ }, { "name": "utopia-php/dns", - "version": "dev-chore-upgrade-domains-1", + "version": "1.5.4", "source": { "type": "git", "url": "https://github.com/utopia-php/dns.git", - "reference": "301b8c5b1cf029ed2dc1437a0508d873ef5718f0" + "reference": "ee831a6f2ceb28babb042ea65539c26ea4530bf6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/dns/zipball/301b8c5b1cf029ed2dc1437a0508d873ef5718f0", - "reference": "301b8c5b1cf029ed2dc1437a0508d873ef5718f0", + "url": "https://api.github.com/repos/utopia-php/dns/zipball/ee831a6f2ceb28babb042ea65539c26ea4530bf6", + "reference": "ee831a6f2ceb28babb042ea65539c26ea4530bf6", "shasum": "" }, "require": { @@ -4115,9 +4115,9 @@ ], "support": { "issues": "https://github.com/utopia-php/dns/issues", - "source": "https://github.com/utopia-php/dns/tree/chore-upgrade-domains-1" + "source": "https://github.com/utopia-php/dns/tree/1.5.4" }, - "time": "2026-01-30T14:09:32+00:00" + "time": "2026-02-02T10:40:38+00:00" }, { "name": "utopia-php/domains", @@ -4230,16 +4230,16 @@ }, { "name": "utopia-php/emails", - "version": "dev-chore-upgrade-domains-1", + "version": "0.6.6", "source": { "type": "git", "url": "https://github.com/utopia-php/emails.git", - "reference": "d7ae7a73e05ae1bc8c6686af90a8f4b354b1fdd5" + "reference": "354f7fe591e1fba7736afada558cb3b02ec03fea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/emails/zipball/d7ae7a73e05ae1bc8c6686af90a8f4b354b1fdd5", - "reference": "d7ae7a73e05ae1bc8c6686af90a8f4b354b1fdd5", + "url": "https://api.github.com/repos/utopia-php/emails/zipball/354f7fe591e1fba7736afada558cb3b02ec03fea", + "reference": "354f7fe591e1fba7736afada558cb3b02ec03fea", "shasum": "" }, "require": { @@ -4284,9 +4284,9 @@ ], "support": { "issues": "https://github.com/utopia-php/emails/issues", - "source": "https://github.com/utopia-php/emails/tree/chore-upgrade-domains-1" + "source": "https://github.com/utopia-php/emails/tree/0.6.6" }, - "time": "2026-01-30T14:09:30+00:00" + "time": "2026-02-02T10:41:22+00:00" }, { "name": "utopia-php/fetch", @@ -4578,16 +4578,16 @@ }, { "name": "utopia-php/migration", - "version": "dev-chore-upgrade-database-5", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "afc4eca7d808c360bf2770937f7cc6cbdf9e4ac2" + "reference": "0d6e77748ca7d9302a88953751bd89d577610afd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/afc4eca7d808c360bf2770937f7cc6cbdf9e4ac2", - "reference": "afc4eca7d808c360bf2770937f7cc6cbdf9e4ac2", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/0d6e77748ca7d9302a88953751bd89d577610afd", + "reference": "0d6e77748ca7d9302a88953751bd89d577610afd", "shasum": "" }, "require": { @@ -4628,9 +4628,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/chore-upgrade-database-5" + "source": "https://github.com/utopia-php/migration/tree/1.5.0" }, - "time": "2026-01-30T14:09:29+00:00" + "time": "2026-02-02T10:42:04+00:00" }, { "name": "utopia-php/mongo", @@ -9052,13 +9052,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/abuse": 20, - "utopia-php/audit": 20, - "utopia-php/emails": 20, - "utopia-php/dns": 20, - "utopia-php/migration": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From e79dc39d5dfb14b925228369970b62066a397396 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 2 Feb 2026 12:21:08 +0000 Subject: [PATCH 04/11] chore: update composer.lock --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index c5f32993af..6de0cfd920 100644 --- a/composer.lock +++ b/composer.lock @@ -4902,16 +4902,16 @@ }, { "name": "utopia-php/queue", - "version": "0.15.1", + "version": "0.15.2", "source": { "type": "git", "url": "https://github.com/utopia-php/queue.git", - "reference": "e551606385990ec7901d222017c4cfc2749a518c" + "reference": "5051c08d9f50ff4aa78c0eb2f7ca74b328509c81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/e551606385990ec7901d222017c4cfc2749a518c", - "reference": "e551606385990ec7901d222017c4cfc2749a518c", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/5051c08d9f50ff4aa78c0eb2f7ca74b328509c81", + "reference": "5051c08d9f50ff4aa78c0eb2f7ca74b328509c81", "shasum": "" }, "require": { @@ -4962,9 +4962,9 @@ ], "support": { "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/0.15.1" + "source": "https://github.com/utopia-php/queue/tree/0.15.2" }, - "time": "2026-01-16T07:54:54+00:00" + "time": "2026-02-02T11:56:51+00:00" }, { "name": "utopia-php/registry", From 6876828750027f80732eb2497ed50d73a31ad683 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 2 Feb 2026 12:48:31 +0000 Subject: [PATCH 05/11] add cache reconnection support --- app/init/constants.php | 4 ++ app/init/registers.php | 6 ++- tests/e2e/Services/Health/CacheTest.php | 65 +++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) diff --git a/app/init/constants.php b/app/init/constants.php index 77532f8306..42ef9a6cfd 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -383,3 +383,7 @@ const SCHEDULE_RESOURCE_TYPE_MESSAGE = 'message'; /** Preview cookie */ const COOKIE_NAME_PREVIEW = 'a_jwt_console'; + +// Cache Reconnect +const CACHE_RECONNECT_MAX_ATTEMPTS = 2; +const CACHE_RECONNECT_RETRY_DELAY = 1000; diff --git a/app/init/registers.php b/app/init/registers.php index 8c596aae8e..83a4758426 100644 --- a/app/init/registers.php +++ b/app/init/registers.php @@ -313,10 +313,14 @@ $register->set('pools', function () { default => null }; case 'cache': - return match ($dsn->getScheme()) { + $adapter = match ($dsn->getScheme()) { 'redis' => new RedisCache($resource()), default => null }; + + $adapter->setMaxRetries(CACHE_RECONNECT_MAX_ATTEMPTS); + $adapter->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY); + return $adapter; default: throw new Exception(Exception::GENERAL_SERVER_ERROR, "Server error: Missing adapter implementation."); } diff --git a/tests/e2e/Services/Health/CacheTest.php b/tests/e2e/Services/Health/CacheTest.php index 0b825b2dba..7f9761510b 100644 --- a/tests/e2e/Services/Health/CacheTest.php +++ b/tests/e2e/Services/Health/CacheTest.php @@ -2,6 +2,10 @@ namespace Tests\E2E\Services\Health; +use Redis; +use Utopia\Cache\Adapter\Redis as RedisAdapter; +use Utopia\Cache\Cache; + class CacheTest extends HealthBase { public function testCacheSuccess(): void @@ -13,4 +17,65 @@ class CacheTest extends HealthBase $this->assertLessThan(100, $response['body']['statuses'][0]['ping']); $this->assertEquals('pass', $response['body']['statuses'][0]['status']); } + + public function testCacheReconnect(): void + { + $redis = new Redis(); + $redis->connect('redis', 6379); + $cache = new Cache((new RedisAdapter($redis))->setMaxRetries(CACHE_RECONNECT_MAX_ATTEMPTS)->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY)); + + $cache->save('test:reconnect', 'reconnect', 'test:reconnect'); + + $stopCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker stop'; + exec($stopCmd . ' 2>&1', $output, $exitCode); + $this->assertEquals(0, $exitCode, "Docker stop failed: $stopCmd\nOutput: " . implode("\n", $output)); + sleep(1); + + try { + $cache->load('test:reconnect', 5); + $this->fail('Redis connection should have failed'); + } catch (\RedisException $e) { + } + + $output = []; + $startCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker start'; + exec($startCmd . ' 2>&1', $output, $exitCode); + $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); + sleep(3); + + $this->assertEquals('reconnect', $cache->save('test:reconnect', 'reconnect', 'test:reconnect')); + $this->assertEquals('reconnect', $cache->load('test:reconnect', 5)); + } + + /** + * @depends testCacheReconnect + */ + public function testCacheReconnectPersistent(): void + { + $redis = new Redis(); + $redis->pconnect('redis', 6379); + $cache = new Cache((new RedisAdapter($redis))->setMaxRetries(CACHE_RECONNECT_MAX_ATTEMPTS)->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY)); + + $cache->save('test:reconnect_persistent', 'reconnect_persistent', 'test:reconnect_persistent'); + + $stopCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker stop'; + exec($stopCmd . ' 2>&1', $output, $exitCode); + $this->assertEquals(0, $exitCode, "Docker stop failed: $stopCmd\nOutput: " . implode("\n", $output)); + sleep(1); + + try { + $cache->load('test:reconnect_persistent', 5); + $this->fail('Redis connection should have failed'); + } catch (\RedisException $e) { + } + + $output = []; + $startCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker start'; + exec($startCmd . ' 2>&1', $output, $exitCode); + $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); + sleep(3); + + $this->assertEquals('reconnect_persistent', $cache->save('test:reconnect_persistent', 'reconnect_persistent', 'test:reconnect_persistent')); + $this->assertEquals('reconnect_persistent', $cache->load('test:reconnect_persistent', 5)); + } } From a52f7f24855485e9877b95efe66634dda2467831 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 2 Feb 2026 12:57:40 +0000 Subject: [PATCH 06/11] fix: ensure Redis restart in cache reconnection tests --- tests/e2e/Services/Health/CacheTest.php | 40 ++++++++++++++----------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/tests/e2e/Services/Health/CacheTest.php b/tests/e2e/Services/Health/CacheTest.php index 7f9761510b..735446b836 100644 --- a/tests/e2e/Services/Health/CacheTest.php +++ b/tests/e2e/Services/Health/CacheTest.php @@ -32,17 +32,19 @@ class CacheTest extends HealthBase sleep(1); try { - $cache->load('test:reconnect', 5); - $this->fail('Redis connection should have failed'); - } catch (\RedisException $e) { + try { + $cache->load('test:reconnect', 5); + $this->fail('Redis connection should have failed'); + } catch (\RedisException $e) { + } + } finally { + $output = []; + $startCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker start'; + exec($startCmd . ' 2>&1', $output, $exitCode); + $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); + sleep(3); } - $output = []; - $startCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker start'; - exec($startCmd . ' 2>&1', $output, $exitCode); - $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); - sleep(3); - $this->assertEquals('reconnect', $cache->save('test:reconnect', 'reconnect', 'test:reconnect')); $this->assertEquals('reconnect', $cache->load('test:reconnect', 5)); } @@ -64,17 +66,19 @@ class CacheTest extends HealthBase sleep(1); try { - $cache->load('test:reconnect_persistent', 5); - $this->fail('Redis connection should have failed'); - } catch (\RedisException $e) { + try { + $cache->load('test:reconnect_persistent', 5); + $this->fail('Redis connection should have failed'); + } catch (\RedisException $e) { + } + } finally { + $output = []; + $startCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker start'; + exec($startCmd . ' 2>&1', $output, $exitCode); + $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); + sleep(3); } - $output = []; - $startCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker start'; - exec($startCmd . ' 2>&1', $output, $exitCode); - $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); - sleep(3); - $this->assertEquals('reconnect_persistent', $cache->save('test:reconnect_persistent', 'reconnect_persistent', 'test:reconnect_persistent')); $this->assertEquals('reconnect_persistent', $cache->load('test:reconnect_persistent', 5)); } From e7b4f032278888e5f31b4c8b931bc689757b45dc Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 2 Feb 2026 13:19:41 +0000 Subject: [PATCH 07/11] improve cache reconnection tests --- app/init/constants.php | 2 +- app/init/registers.php | 2 +- tests/e2e/Services/Health/CacheTest.php | 28 ++++++++++++++++++------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/app/init/constants.php b/app/init/constants.php index 42ef9a6cfd..7912cb823a 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -385,5 +385,5 @@ const SCHEDULE_RESOURCE_TYPE_MESSAGE = 'message'; const COOKIE_NAME_PREVIEW = 'a_jwt_console'; // Cache Reconnect -const CACHE_RECONNECT_MAX_ATTEMPTS = 2; +const CACHE_RECONNECT_MAX_RETRIES = 2; const CACHE_RECONNECT_RETRY_DELAY = 1000; diff --git a/app/init/registers.php b/app/init/registers.php index 83a4758426..50d6a99380 100644 --- a/app/init/registers.php +++ b/app/init/registers.php @@ -318,7 +318,7 @@ $register->set('pools', function () { default => null }; - $adapter->setMaxRetries(CACHE_RECONNECT_MAX_ATTEMPTS); + $adapter->setMaxRetries(CACHE_RECONNECT_MAX_RETRIES); $adapter->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY); return $adapter; default: diff --git a/tests/e2e/Services/Health/CacheTest.php b/tests/e2e/Services/Health/CacheTest.php index 735446b836..d47105cd6e 100644 --- a/tests/e2e/Services/Health/CacheTest.php +++ b/tests/e2e/Services/Health/CacheTest.php @@ -22,7 +22,11 @@ class CacheTest extends HealthBase { $redis = new Redis(); $redis->connect('redis', 6379); - $cache = new Cache((new RedisAdapter($redis))->setMaxRetries(CACHE_RECONNECT_MAX_ATTEMPTS)->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY)); + $cache = new Cache( + (new RedisAdapter($redis)) + ->setMaxRetries(CACHE_RECONNECT_MAX_RETRIES) + ->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY) + ); $cache->save('test:reconnect', 'reconnect', 'test:reconnect'); @@ -42,11 +46,13 @@ class CacheTest extends HealthBase $startCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker start'; exec($startCmd . ' 2>&1', $output, $exitCode); $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); - sleep(3); } - $this->assertEquals('reconnect', $cache->save('test:reconnect', 'reconnect', 'test:reconnect')); - $this->assertEquals('reconnect', $cache->load('test:reconnect', 5)); + $this->assertEventually(function () use ($cache) { + $this->assertEquals('reconnect', $cache->save('test:reconnect', 'reconnect', 'test:reconnect')); + $this->assertEquals('reconnect', $cache->load('test:reconnect', 5)); + return true; + }, 10000, 1000); } /** @@ -56,7 +62,11 @@ class CacheTest extends HealthBase { $redis = new Redis(); $redis->pconnect('redis', 6379); - $cache = new Cache((new RedisAdapter($redis))->setMaxRetries(CACHE_RECONNECT_MAX_ATTEMPTS)->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY)); + $cache = new Cache( + (new RedisAdapter($redis)) + ->setMaxRetries(CACHE_RECONNECT_MAX_RETRIES) + ->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY) + ); $cache->save('test:reconnect_persistent', 'reconnect_persistent', 'test:reconnect_persistent'); @@ -76,10 +86,12 @@ class CacheTest extends HealthBase $startCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker start'; exec($startCmd . ' 2>&1', $output, $exitCode); $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); - sleep(3); } - $this->assertEquals('reconnect_persistent', $cache->save('test:reconnect_persistent', 'reconnect_persistent', 'test:reconnect_persistent')); - $this->assertEquals('reconnect_persistent', $cache->load('test:reconnect_persistent', 5)); + $this->assertEventually(function () use ($cache) { + $this->assertEquals('reconnect_persistent', $cache->save('test:reconnect_persistent', 'reconnect_persistent', 'test:reconnect_persistent')); + $this->assertEquals('reconnect_persistent', $cache->load('test:reconnect_persistent', 5)); + return true; + }, 10000, 1000); } } From 914be48e25be005c99c3c5581abf41ef335ab2b0 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 2 Feb 2026 18:25:24 +0000 Subject: [PATCH 08/11] fix: add null check for cache adapter --- app/init/registers.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/init/registers.php b/app/init/registers.php index 50d6a99380..402729246c 100644 --- a/app/init/registers.php +++ b/app/init/registers.php @@ -318,8 +318,11 @@ $register->set('pools', function () { default => null }; - $adapter->setMaxRetries(CACHE_RECONNECT_MAX_RETRIES); - $adapter->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY); + if ($adapter !== null) { + $adapter->setMaxRetries(CACHE_RECONNECT_MAX_RETRIES); + $adapter->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY); + } + return $adapter; default: throw new Exception(Exception::GENERAL_SERVER_ERROR, "Server error: Missing adapter implementation."); From 255098ed9c9e746ecaa891afbb2caa4683948270 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 2 Feb 2026 18:36:16 +0000 Subject: [PATCH 09/11] use env vars for cache reconnection tests --- tests/e2e/Services/Health/CacheTest.php | 27 +++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/tests/e2e/Services/Health/CacheTest.php b/tests/e2e/Services/Health/CacheTest.php index d47105cd6e..3ba63f4d22 100644 --- a/tests/e2e/Services/Health/CacheTest.php +++ b/tests/e2e/Services/Health/CacheTest.php @@ -5,9 +5,22 @@ namespace Tests\E2E\Services\Health; use Redis; use Utopia\Cache\Adapter\Redis as RedisAdapter; use Utopia\Cache\Cache; +use Utopia\System\System; class CacheTest extends HealthBase { + private static string $redisHost; + private static int $redisPort; + private static string $redisContainer; + + public static function setUpBeforeClass(): void + { + parent::setUpBeforeClass(); + self::$redisHost = System::getEnv('_APP_REDIS_HOST', 'redis'); + self::$redisPort = (int) System::getEnv('_APP_REDIS_PORT', '6379'); + self::$redisContainer = System::getEnv('_APP_REDIS_CONTAINER', 'appwrite-redis'); + } + public function testCacheSuccess(): void { $response = $this->callGet('/health/cache'); @@ -21,7 +34,7 @@ class CacheTest extends HealthBase public function testCacheReconnect(): void { $redis = new Redis(); - $redis->connect('redis', 6379); + $redis->connect(self::$redisHost, self::$redisPort); $cache = new Cache( (new RedisAdapter($redis)) ->setMaxRetries(CACHE_RECONNECT_MAX_RETRIES) @@ -30,7 +43,8 @@ class CacheTest extends HealthBase $cache->save('test:reconnect', 'reconnect', 'test:reconnect'); - $stopCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker stop'; + $container = self::$redisContainer; + $stopCmd = "docker ps -a --filter \"name={$container}\" --format \"{{.Names}}\" | xargs -r docker stop"; exec($stopCmd . ' 2>&1', $output, $exitCode); $this->assertEquals(0, $exitCode, "Docker stop failed: $stopCmd\nOutput: " . implode("\n", $output)); sleep(1); @@ -43,7 +57,7 @@ class CacheTest extends HealthBase } } finally { $output = []; - $startCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker start'; + $startCmd = "docker ps -a --filter \"name={$container}\" --format \"{{.Names}}\" | xargs -r docker start"; exec($startCmd . ' 2>&1', $output, $exitCode); $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); } @@ -61,7 +75,7 @@ class CacheTest extends HealthBase public function testCacheReconnectPersistent(): void { $redis = new Redis(); - $redis->pconnect('redis', 6379); + $redis->pconnect(self::$redisHost, self::$redisPort); $cache = new Cache( (new RedisAdapter($redis)) ->setMaxRetries(CACHE_RECONNECT_MAX_RETRIES) @@ -70,7 +84,8 @@ class CacheTest extends HealthBase $cache->save('test:reconnect_persistent', 'reconnect_persistent', 'test:reconnect_persistent'); - $stopCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker stop'; + $container = self::$redisContainer; + $stopCmd = "docker ps -a --filter \"name={$container}\" --format \"{{.Names}}\" | xargs -r docker stop"; exec($stopCmd . ' 2>&1', $output, $exitCode); $this->assertEquals(0, $exitCode, "Docker stop failed: $stopCmd\nOutput: " . implode("\n", $output)); sleep(1); @@ -83,7 +98,7 @@ class CacheTest extends HealthBase } } finally { $output = []; - $startCmd = 'docker ps -a --filter "name=appwrite-redis" --format "{{.Names}}" | xargs -r docker start'; + $startCmd = "docker ps -a --filter \"name={$container}\" --format \"{{.Names}}\" | xargs -r docker start"; exec($startCmd . ' 2>&1', $output, $exitCode); $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); } From 8117ab9542425da5b9ee913b8f1378065a6f66d2 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 2 Feb 2026 19:07:50 +0000 Subject: [PATCH 10/11] simplify CacheTest to match other Health tests --- tests/e2e/Services/Health/CacheTest.php | 96 ------------------------- 1 file changed, 96 deletions(-) diff --git a/tests/e2e/Services/Health/CacheTest.php b/tests/e2e/Services/Health/CacheTest.php index 3ba63f4d22..0b825b2dba 100644 --- a/tests/e2e/Services/Health/CacheTest.php +++ b/tests/e2e/Services/Health/CacheTest.php @@ -2,25 +2,8 @@ namespace Tests\E2E\Services\Health; -use Redis; -use Utopia\Cache\Adapter\Redis as RedisAdapter; -use Utopia\Cache\Cache; -use Utopia\System\System; - class CacheTest extends HealthBase { - private static string $redisHost; - private static int $redisPort; - private static string $redisContainer; - - public static function setUpBeforeClass(): void - { - parent::setUpBeforeClass(); - self::$redisHost = System::getEnv('_APP_REDIS_HOST', 'redis'); - self::$redisPort = (int) System::getEnv('_APP_REDIS_PORT', '6379'); - self::$redisContainer = System::getEnv('_APP_REDIS_CONTAINER', 'appwrite-redis'); - } - public function testCacheSuccess(): void { $response = $this->callGet('/health/cache'); @@ -30,83 +13,4 @@ class CacheTest extends HealthBase $this->assertLessThan(100, $response['body']['statuses'][0]['ping']); $this->assertEquals('pass', $response['body']['statuses'][0]['status']); } - - public function testCacheReconnect(): void - { - $redis = new Redis(); - $redis->connect(self::$redisHost, self::$redisPort); - $cache = new Cache( - (new RedisAdapter($redis)) - ->setMaxRetries(CACHE_RECONNECT_MAX_RETRIES) - ->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY) - ); - - $cache->save('test:reconnect', 'reconnect', 'test:reconnect'); - - $container = self::$redisContainer; - $stopCmd = "docker ps -a --filter \"name={$container}\" --format \"{{.Names}}\" | xargs -r docker stop"; - exec($stopCmd . ' 2>&1', $output, $exitCode); - $this->assertEquals(0, $exitCode, "Docker stop failed: $stopCmd\nOutput: " . implode("\n", $output)); - sleep(1); - - try { - try { - $cache->load('test:reconnect', 5); - $this->fail('Redis connection should have failed'); - } catch (\RedisException $e) { - } - } finally { - $output = []; - $startCmd = "docker ps -a --filter \"name={$container}\" --format \"{{.Names}}\" | xargs -r docker start"; - exec($startCmd . ' 2>&1', $output, $exitCode); - $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); - } - - $this->assertEventually(function () use ($cache) { - $this->assertEquals('reconnect', $cache->save('test:reconnect', 'reconnect', 'test:reconnect')); - $this->assertEquals('reconnect', $cache->load('test:reconnect', 5)); - return true; - }, 10000, 1000); - } - - /** - * @depends testCacheReconnect - */ - public function testCacheReconnectPersistent(): void - { - $redis = new Redis(); - $redis->pconnect(self::$redisHost, self::$redisPort); - $cache = new Cache( - (new RedisAdapter($redis)) - ->setMaxRetries(CACHE_RECONNECT_MAX_RETRIES) - ->setRetryDelay(CACHE_RECONNECT_RETRY_DELAY) - ); - - $cache->save('test:reconnect_persistent', 'reconnect_persistent', 'test:reconnect_persistent'); - - $container = self::$redisContainer; - $stopCmd = "docker ps -a --filter \"name={$container}\" --format \"{{.Names}}\" | xargs -r docker stop"; - exec($stopCmd . ' 2>&1', $output, $exitCode); - $this->assertEquals(0, $exitCode, "Docker stop failed: $stopCmd\nOutput: " . implode("\n", $output)); - sleep(1); - - try { - try { - $cache->load('test:reconnect_persistent', 5); - $this->fail('Redis connection should have failed'); - } catch (\RedisException $e) { - } - } finally { - $output = []; - $startCmd = "docker ps -a --filter \"name={$container}\" --format \"{{.Names}}\" | xargs -r docker start"; - exec($startCmd . ' 2>&1', $output, $exitCode); - $this->assertEquals(0, $exitCode, "Docker start failed: $startCmd\nOutput: " . implode("\n", $output)); - } - - $this->assertEventually(function () use ($cache) { - $this->assertEquals('reconnect_persistent', $cache->save('test:reconnect_persistent', 'reconnect_persistent', 'test:reconnect_persistent')); - $this->assertEquals('reconnect_persistent', $cache->load('test:reconnect_persistent', 5)); - return true; - }, 10000, 1000); - } } From cbe7ce7269a41ebbf301762266dbc323c390bde9 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 2 Feb 2026 21:47:46 +0000 Subject: [PATCH 11/11] fix merge conflict in composer.lock --- composer.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 562ffefe70..10e68b7f63 100644 --- a/composer.lock +++ b/composer.lock @@ -9052,7 +9052,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": {