chore(deps): pin utopia-php/database 5.6.* and split DB credentials by adapter

- Bump utopia-php/database from dev-feat-redis-adapter to released 5.6.* now
  that PR #872 (Redis adapter) is merged and tagged.
- Drop the VCS repository override; 5.6.0 is on Packagist.
- registers.php: when _APP_DB_ADAPTER=redis, sourcing user/pass from
  _APP_DB_USER/_APP_DB_PASS forces a spurious AUTH against an unauthenticated
  Redis instance. Fall back to _APP_REDIS_USER/_APP_REDIS_PASS for the redis
  scheme so the SQL/Mongo creds don't bleed into the Redis client.
- .env: switch dev test backend from sqlite to redis (host=redis-mirror,
  port=6379) to match the CI matrix added in 95e5a6e3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jake Barnby
2026-05-01 14:35:11 +12:00
co-authored by Claude Opus 4.7
parent 95e5a6e365
commit 5e8878d978
4 changed files with 35 additions and 77 deletions
+3 -3
View File
@@ -40,9 +40,9 @@ _APP_REDIS_PORT=6379
_APP_REDIS_PASS=
_APP_REDIS_USER=
COMPOSE_PROFILES=mongodb,postgresql
_APP_DB_ADAPTER=sqlite
_APP_DB_HOST=mongodb
_APP_DB_PORT=0
_APP_DB_ADAPTER=redis
_APP_DB_HOST=redis-mirror
_APP_DB_PORT=6379
_APP_DB_SCHEMA=appwrite
_APP_DB_USER=user
_APP_DB_PASS=password
+6 -3
View File
@@ -154,12 +154,15 @@ $register->set('realtimeLogger', function () {
$register->set('pools', function () {
$group = new Group();
$dbAdapter = System::getEnv('_APP_DB_ADAPTER', 'mongodb');
$fallbackForDB = 'db_main=' . AppwriteURL::unparse([
'scheme' => System::getEnv('_APP_DB_ADAPTER', 'mongodb'),
'scheme' => $dbAdapter,
'host' => System::getEnv('_APP_DB_HOST', 'mongodb'),
'port' => System::getEnv('_APP_DB_PORT', '27017'),
'user' => System::getEnv('_APP_DB_USER', ''),
'pass' => System::getEnv('_APP_DB_PASS', ''),
// Redis uses dedicated _APP_REDIS_* credentials; the SQL/Mongo
// _APP_DB_USER/PASS pair would otherwise force a spurious AUTH.
'user' => $dbAdapter === 'redis' ? System::getEnv('_APP_REDIS_USER', '') : System::getEnv('_APP_DB_USER', ''),
'pass' => $dbAdapter === 'redis' ? System::getEnv('_APP_REDIS_PASS', '') : System::getEnv('_APP_DB_PASS', ''),
'path' => System::getEnv('_APP_DB_SCHEMA', ''),
]);
$fallbackForRedis = 'redis_main=' . AppwriteURL::unparse([
+2 -8
View File
@@ -61,7 +61,7 @@
"utopia-php/compression": "0.1.*",
"utopia-php/config": "1.*",
"utopia-php/console": "0.1.*",
"utopia-php/database": "dev-feat-redis-adapter as 5.999.0",
"utopia-php/database": "5.6.*",
"utopia-php/detector": "0.2.*",
"utopia-php/domains": "1.*",
"utopia-php/emails": "0.6.*",
@@ -118,11 +118,5 @@
"php-http/discovery": true,
"tbachert/spi": true
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/utopia-php/database.git"
}
]
}
}
Generated
+24 -63
View File
@@ -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": "766ebd92fb768ab71ec9d47bfc84d411",
"content-hash": "718b3c14dc116c0d88e7aaf2feb886dc",
"packages": [
{
"name": "adhocore/jwt",
@@ -3850,22 +3850,23 @@
},
{
"name": "utopia-php/database",
"version": "dev-feat-sqlite-fts",
"version": "5.6.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "00d502fef7196440c1083ed391c7f8f7efce5c80"
"reference": "609ebcd64be1ec6fab00c5f46fce54acb0031b3c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/00d502fef7196440c1083ed391c7f8f7efce5c80",
"reference": "00d502fef7196440c1083ed391c7f8f7efce5c80",
"url": "https://api.github.com/repos/utopia-php/database/zipball/609ebcd64be1ec6fab00c5f46fce54acb0031b3c",
"reference": "609ebcd64be1ec6fab00c5f46fce54acb0031b3c",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-mongodb": "*",
"ext-pdo": "*",
"ext-redis": "*",
"php": ">=8.4",
"utopia-php/cache": "1.*",
"utopia-php/console": "0.1.*",
@@ -3889,38 +3890,7 @@
"Utopia\\Database\\": "src/Database"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\E2E\\": "tests/e2e",
"Tests\\Unit\\": "tests/unit"
}
},
"scripts": {
"build": [
"Composer\\Config::disableProcessTimeout",
"docker compose build"
],
"start": [
"Composer\\Config::disableProcessTimeout",
"docker compose up -d"
],
"test": [
"Composer\\Config::disableProcessTimeout",
"docker compose exec tests vendor/bin/phpunit --configuration phpunit.xml"
],
"lint": [
"php -d memory_limit=2G ./vendor/bin/pint --test"
],
"format": [
"php -d memory_limit=2G ./vendor/bin/pint"
],
"check": [
"./vendor/bin/phpstan analyse --level 7 src tests --memory-limit 2G"
],
"coverage": [
"./vendor/bin/coverage-check ./tmp/clover.xml 90"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -3933,10 +3903,10 @@
"utopia"
],
"support": {
"source": "https://github.com/utopia-php/database/tree/feat-sqlite-fts",
"issues": "https://github.com/utopia-php/database/issues"
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/5.6.0"
},
"time": "2026-04-30T04:34:35+00:00"
"time": "2026-05-01T01:28:07+00:00"
},
{
"name": "utopia-php/detector",
@@ -4561,16 +4531,16 @@
},
{
"name": "utopia-php/migration",
"version": "1.9.4",
"version": "1.9.6",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/migration.git",
"reference": "969dc9477ea962f16da9254facdbd8944cf13477"
"reference": "b164631404ec759f8c368fe2321f44c22bc258ab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/migration/zipball/969dc9477ea962f16da9254facdbd8944cf13477",
"reference": "969dc9477ea962f16da9254facdbd8944cf13477",
"url": "https://api.github.com/repos/utopia-php/migration/zipball/b164631404ec759f8c368fe2321f44c22bc258ab",
"reference": "b164631404ec759f8c368fe2321f44c22bc258ab",
"shasum": ""
},
"require": {
@@ -4610,9 +4580,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/migration/issues",
"source": "https://github.com/utopia-php/migration/tree/1.9.4"
"source": "https://github.com/utopia-php/migration/tree/1.9.6"
},
"time": "2026-04-27T12:42:51+00:00"
"time": "2026-04-30T08:11:07+00:00"
},
{
"name": "utopia-php/mongo",
@@ -5051,16 +5021,16 @@
},
{
"name": "utopia-php/storage",
"version": "2.0.0",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/storage.git",
"reference": "52d1f89a47165ef0d3deff63043cda182175adfb"
"reference": "8a2e3a86fd01aaed675884146665308c2122264e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/storage/zipball/52d1f89a47165ef0d3deff63043cda182175adfb",
"reference": "52d1f89a47165ef0d3deff63043cda182175adfb",
"url": "https://api.github.com/repos/utopia-php/storage/zipball/8a2e3a86fd01aaed675884146665308c2122264e",
"reference": "8a2e3a86fd01aaed675884146665308c2122264e",
"shasum": ""
},
"require": {
@@ -5097,9 +5067,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/storage/issues",
"source": "https://github.com/utopia-php/storage/tree/2.0.0"
"source": "https://github.com/utopia-php/storage/tree/2.0.1"
},
"time": "2026-04-27T11:39:32+00:00"
"time": "2026-04-29T09:05:48+00:00"
},
{
"name": "utopia-php/system",
@@ -8473,18 +8443,9 @@
"time": "2024-11-07T12:36:22+00:00"
}
],
"aliases": [
{
"package": "utopia-php/database",
"version": "dev-feat-sqlite-fts",
"alias": "5.999.0",
"alias_normalized": "5.999.0.0"
}
],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": {
"utopia-php/database": 20
},
"stability-flags": {},
"prefer-stable": true,
"prefer-lowest": false,
"platform": {