Add RequiresVectorsDB and RequiresDocumentsDB traits that probe the
database create endpoint once per test class and call markTestSkipped
when the backend returns a 500 error. This handles CI environments
where COMPOSE_PROFILES only starts a single database service.
Applied to all VectorsDB test classes (need PostgreSQL) and all
DocumentsDB test classes (need MongoDB): main tests, permissions
tests, and transaction tests. Also added a fallback guard in the
shared DatabasesBase::setupDatabase() method.
CI runs only one database at a time (via COMPOSE_PROFILES), so
PostgreSQL (needed by VectorsDB) or MongoDB (needed by DocumentsDB)
may not be available. Skip these tests gracefully with markTestSkipped
when the database create endpoint returns a 500 error.
_APP_DB_HOST_DOCUMENTSDB and _APP_DB_HOST_VECTORSDB were being used
to read the database adapter scheme, but the correct env vars are
_APP_DB_ADAPTER_DOCUMENTSDB and _APP_DB_ADAPTER_VECTORSDB. The HOST
variants contain the hostname, not the adapter type, causing DSN
construction to fail with 500 errors.
When --release=yes, the Appwrite spec version is not needed since
the release flow uses the SDK version from config. This moves the
version prompt and validation behind a !$createRelease guard and
hoists the release block before the spec/SDK generation setup.
Revert auth types in Bulk/Upsert.php back to [AuthType::ADMIN, AuthType::KEY]
and remove duplicate query filter in Databases/XList.php that were accidentally
introduced during the 1.9.x merge.
https://claude.ai/code/session_01JLPDurUgyj7qViA8JqQFTH
remove duplicate inject('user') from XList in DocumentsDB/VectorsDB
- DocumentsDB and VectorsDB Transactions/Operations/Create.php were
missing ->inject('user') needed by parent action method
- DocumentsDB and VectorsDB Collections/Documents/XList.php had
duplicate ->inject('user') calls - removed the extra one
https://claude.ai/code/session_01JLPDurUgyj7qViA8JqQFTH
The parent action methods in Databases/Collections/Documents require a
User $user parameter, but 10 child classes in DocumentsDB (6) and
VectorsDB (4) were missing the ->inject('user') call in their
constructor inject chains. This caused fatal errors when those
endpoints were hit during E2E tests.
Files fixed:
- DocumentsDB: Delete, Get, Update, XList, Attribute/Increment, Attribute/Decrement
- VectorsDB: Delete, Get, Update, XList
https://claude.ai/code/session_01JLPDurUgyj7qViA8JqQFTH
Since setDocumentType('users', User::class) is registered on all
database instances, getDocument('users', ...) already returns User
instances. The new User($doc->getArrayCopy()) pattern was redundant
and could lose internal state managed by the database layer.
https://claude.ai/code/session_01JLPDurUgyj7qViA8JqQFTH