Skip to content

fix: null validation for optional params#10778

Merged
loks0n merged 5 commits into1.8.xfrom
fix-nullable-validation
Nov 13, 2025
Merged

fix: null validation for optional params#10778
loks0n merged 5 commits into1.8.xfrom
fix-nullable-validation

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 7, 2025

📝 Walkthrough

Walkthrough

This pull request consistently replaces many endpoint parameter validators with nullable variants by wrapping existing validators with Utopia\Validator\Nullable (e.g., new Text(...)new Nullable(new Text(...)), new UID()new Nullable(new UID()), new Permissions(...)new Nullable(new Permissions(...)), etc.). The change set spans modules for databases, tables, messaging, storage, projects, functions, sites, users, and more. Each modified file adds the use Utopia\Validator\Nullable; import where required. No control-flow, business logic, or algorithmic behavior is changed beyond widening parameter validation to accept null.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30–45 minutes

  • Pattern is highly repetitive (same nullable-wrapper applied broadly), reducing per-file complexity, but the scope is large and touches many API declarations.
  • Focus review on:
    • Presence and correctness of use Utopia\Validator\Nullable; imports (no duplicates or missing imports).
    • Correct wrapping (no accidental double-wrapping, correct instantiation: new Nullable(new X(...))).
    • Places where PHP action signatures were updated to nullable types (e.g., project OAuth2 update, project variable update, keys endpoints) — ensure handler code and downstream callers accept nullable values.
    • Permission and transactionId fields (staging/transaction flows) — confirm downstream logic tolerates null and that semantics remain consistent.
    • Any validators that carry side constraints (e.g., WhiteList, Range, ArrayList) — confirm inner validator parameters were preserved.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess whether it relates to the changeset. Add a description explaining the motivation and scope of making optional parameters nullable across the codebase to improve clarity for reviewers.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: null validation for optional params' directly and accurately describes the main change across the entire changeset: wrapping validators with Nullable to allow optional parameters to accept null values.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-nullable-validation

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 74492de and b695ddc.

⛔ Files ignored due to path filters (8)
  • app/config/specs/open-api3-1.8.x-console.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-1.8.x-server.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-console.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-server.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-1.8.x-console.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-1.8.x-server.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-console.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-server.json is excluded by !app/config/specs/**
📒 Files selected for processing (1)
  • app/controllers/api/users.php (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/controllers/api/users.php
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: Setup & Build SDK
  • GitHub Check: scan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 7, 2025

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
binutils 2.44-r2 CVE-2025-5244 HIGH
binutils 2.44-r2 CVE-2025-5245 HIGH
libxml2 2.13.8-r0 CVE-2025-49794 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49796 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49795 HIGH
libxml2 2.13.8-r0 CVE-2025-6021 HIGH
pcre2 10.43-r1 CVE-2025-58050 CRITICAL
github.com/containerd/containerd/v2 v2.0.2 CVE-2024-25621 HIGH
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH
stdlib 1.22.10 CVE-2025-47907 HIGH
stdlib 1.22.10 CVE-2025-58183 HIGH
stdlib 1.22.10 CVE-2025-58186 HIGH
stdlib 1.22.10 CVE-2025-58187 HIGH
stdlib 1.22.10 CVE-2025-58188 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 7, 2025

✨ Benchmark results

  • Requests per second: 1,128
  • Requests with 200 status code: 203,073
  • P99 latency: 0.170351901

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,128 1,171
200 203,073 210,848
P99 0.170351901 0.17633618

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d0ca83 and e660c6c.

📒 Files selected for processing (3)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php (2 hunks)
  • tests/unit/Network/Validators/DNSTest.php (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: ItzNotABug
Repo: appwrite/appwrite PR: 9693
File: src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php:54-54
Timestamp: 2025-05-05T03:49:58.171Z
Learning: In Appwrite's API handlers, path parameters can use `null` as the default value rather than empty strings, as this pattern is consistent with existing code in the codebase.
🧬 Code graph analysis (3)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
tests/unit/Network/Validators/DNSTest.php (1)
src/Appwrite/Network/Validator/DNS.php (1)
  • DNS (13-116)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: E2E Service Test (Teams)
  • GitHub Check: E2E Service Test (Databases/TablesDB)
  • GitHub Check: E2E Service Test (Proxy)
  • GitHub Check: E2E Service Test (Tokens)
  • GitHub Check: E2E Service Test (Locale)
  • GitHub Check: E2E Service Test (Databases/Legacy)
  • GitHub Check: E2E Service Test (Health)
  • GitHub Check: E2E Service Test (FunctionsSchedule)
  • GitHub Check: E2E Service Test (Realtime)
  • GitHub Check: E2E Service Test (Avatars)
  • GitHub Check: E2E Service Test (Account)
  • GitHub Check: E2E Shared Mode Service Test (Dev Keys) (Shared V2)
  • GitHub Check: E2E Shared Mode Service Test (Site Screenshots) (Shared V2)
  • GitHub Check: E2E Shared Mode Service Test (Site Screenshots) (Shared V1)
  • GitHub Check: E2E Service Test (Dev Keys)
  • GitHub Check: E2E Service Test (Site Screenshots)
  • GitHub Check: E2E Shared Mode Service Test (Dev Keys) (Shared V1)
  • GitHub Check: Unit Test
  • GitHub Check: E2E General Test
  • GitHub Check: scan
🔇 Additional comments (2)
tests/unit/Network/Validators/DNSTest.php (1)

54-55: Clarify the relationship to null validation fixes.

The explicit DNS server parameter (8.8.8.8) doesn't appear directly related to the PR's stated purpose of fixing "null validation for optional params." Since the DNS validator already defaults to 8.8.8.8 (per the constructor in src/Appwrite/Network/Validator/DNS.php), this change has no functional impact—it just makes the server explicit.

Was this change included to improve test determinism or address flakiness?

src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php (1)

22-22: LGTM! Nullable wrapper aligns with runtime validation.

The Nullable wrapper correctly allows null values for the optional default parameter. This is consistent with:

  • The nullable type hint (?string $default) in the action method
  • The runtime validation at lines 110-113, which explicitly skips validation when $default is null

The import is properly added and follows the same pattern as the Datetime attribute changes.

Also applies to: 72-72

@ChiragAgg5k ChiragAgg5k force-pushed the fix-nullable-validation branch from 1c343be to 0ed4b5d Compare November 10, 2025 04:47
@ChiragAgg5k ChiragAgg5k requested a review from Copilot November 10, 2025 04:49
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Nov 10, 2025

Open in StackBlitz

npm i https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@10778

commit: b695ddc

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds Nullable validator wrappers to optional parameters across the Appwrite platform to properly handle null values in API validation. The changes ensure that when parameters have a default value of null and are marked as optional (the last boolean parameter in ->param() is true), they are wrapped with the Nullable validator.

Key changes:

  • Wraps optional parameters with Nullable validator in parameter definitions across modules (Sites, Functions, Databases, Storage, Messaging, Projects, Users)
  • Adds corresponding use Utopia\Validator\Nullable; import statements
  • Updates OpenAPI/Swagger specification files to include "x-nullable": true property for affected parameters

Reviewed Changes

Copilot reviewed 92 out of 92 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php Wraps value and secret optional parameters with Nullable validator
src/Appwrite/Platform/Modules/Sites/Http/Deployments/Create.php Wraps installCommand, buildCommand, and outputDirectory with Nullable
src/Appwrite/Platform/Modules/Functions/Http/Variables/Update.php Wraps value and secret optional parameters with Nullable
src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php Wraps scheduledAt parameter with Nullable
src/Appwrite/Platform/Modules/Functions/Http/Deployments/Create.php Wraps entrypoint and commands with Nullable
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php Wraps permissions parameter with Nullable
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/*.php Wraps transactionId and permissions parameters with Nullable across multiple row operations
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/*/Update.php Wraps newKey parameter with Nullable across all column type updates
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/*/Create.php Wraps default parameter with Nullable across various column type creations
app/controllers/api/users.php Wraps email and phone parameters with Nullable
app/controllers/api/storage.php Wraps permissions and name parameters with Nullable
app/controllers/api/projects.php Wraps various OAuth provider and API key parameters with Nullable
app/controllers/api/project.php Wraps variable value and secret parameters with Nullable
app/controllers/api/messaging.php Wraps numerous messaging provider and message parameters with Nullable
app/config/specs/*.json Updates OpenAPI/Swagger specs to mark nullable parameters with "x-nullable": true"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/controllers/api/project.php (1)

683-684: Fix class name typo: textText (fatal error).

Lowercase text will break autoloading.

Apply:

-    ->param('secret', null, new Nullable(new text(512)), 'Provider secret key. Max length: 512 chars.', true)
+    ->param('secret', null, new Nullable(new Text(512)), 'Provider secret key. Max length: 512 chars.', true)
🧹 Nitpick comments (1)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php (1)

61-61: Tiny copy edit.

Grammar nit: “an API key”.

- '... but Server SDKs with and API key can still read and write ...'
+ '... but Server SDKs with an API key can still read and write ...'
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf33779 and 9ecffbf.

⛔ Files ignored due to path filters (12)
  • app/config/specs/open-api3-1.8.x-client.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-1.8.x-console.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-1.8.x-server.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-client.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-console.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-server.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-1.8.x-client.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-1.8.x-console.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-1.8.x-server.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-client.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-console.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-server.json is excluded by !app/config/specs/**
📒 Files selected for processing (80)
  • app/controllers/api/messaging.php (31 hunks)
  • app/controllers/api/project.php (2 hunks)
  • app/controllers/api/projects.php (4 hunks)
  • app/controllers/api/storage.php (5 hunks)
  • app/controllers/api/users.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Line/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Point/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Polygon/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Line/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Point/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Polygon/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Update.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php (1 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Decrement.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php (2 hunks)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php (2 hunks)
  • src/Appwrite/Platform/Modules/Functions/Http/Deployments/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Functions/Http/Variables/Update.php (2 hunks)
  • src/Appwrite/Platform/Modules/Sites/Http/Deployments/Create.php (2 hunks)
  • src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (10)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Create.php
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: ItzNotABug
Repo: appwrite/appwrite PR: 9693
File: src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php:54-54
Timestamp: 2025-05-05T03:49:58.171Z
Learning: In Appwrite's API handlers, path parameters can use `null` as the default value rather than empty strings, as this pattern is consistent with existing code in the codebase.
📚 Learning: 2025-06-19T09:20:03.312Z
Learnt from: ItzNotABug
Repo: appwrite/appwrite PR: 9693
File: src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php:57-59
Timestamp: 2025-06-19T09:20:03.312Z
Learning: In table-related endpoints (such as `src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php`), parameter descriptions should use "table" and "row" terminology instead of "collection" and "document" for clarity and consistency.

Applied to files:

  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php
📚 Learning: 2025-08-11T10:32:38.142Z
Learnt from: abnegate
Repo: appwrite/appwrite PR: 10297
File: app/controllers/api/users.php:649-657
Timestamp: 2025-08-11T10:32:38.142Z
Learning: In Appwrite's utopia-php/database (version 0.77.* and later), the database layer internally handles filter separation for count operations. When using `$dbForProject->count()` within a `skipFilters` closure, there's no need to manually separate filter queries using `Query::groupByType($queries)['filters']` as the database handles this automatically.

Applied to files:

  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php
📚 Learning: 2025-05-05T03:49:58.171Z
Learnt from: ItzNotABug
Repo: appwrite/appwrite PR: 9693
File: src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php:54-54
Timestamp: 2025-05-05T03:49:58.171Z
Learning: In Appwrite's API handlers, path parameters can use `null` as the default value rather than empty strings, as this pattern is consistent with existing code in the codebase.

Applied to files:

  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php
📚 Learning: 2025-10-02T10:16:48.075Z
Learnt from: abnegate
Repo: appwrite/appwrite PR: 10023
File: src/Appwrite/Databases/TransactionState.php:174-219
Timestamp: 2025-10-02T10:16:48.075Z
Learning: In `src/Appwrite/Databases/TransactionState.php`, the `listDocuments` method intentionally applies queries only to the initial database fetch of committed documents. Transaction state changes (creates, updates, deletes) are then overlaid on top of the filtered committed set without re-evaluating the queries against the final merged result. This is the intended behavior for transaction-aware document listing.

Applied to files:

  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php
🧬 Code graph analysis (70)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Decrement.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Line/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Sites/Http/Deployments/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Point/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
app/controllers/api/users.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Polygon/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Functions/Http/Deployments/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Polygon/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Functions/Http/Variables/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
app/controllers/api/storage.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Point/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
app/controllers/api/project.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Line/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
app/controllers/api/messaging.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
app/controllers/api/projects.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: Benchmark
  • GitHub Check: E2E Service Test (FunctionsSchedule)
  • GitHub Check: E2E Service Test (Functions)
  • GitHub Check: E2E Service Test (Health)
  • GitHub Check: E2E Service Test (Realtime)
  • GitHub Check: E2E Service Test (Migrations)
  • GitHub Check: E2E Service Test (Storage)
  • GitHub Check: E2E Service Test (Avatars)
  • GitHub Check: E2E Service Test (Messaging)
  • GitHub Check: E2E Service Test (Proxy)
  • GitHub Check: E2E Service Test (Webhooks)
  • GitHub Check: E2E Service Test (Databases/TablesDB)
  • GitHub Check: E2E Service Test (Console)
  • GitHub Check: E2E Service Test (Databases/Legacy)
  • GitHub Check: E2E General Test

@loks0n loks0n requested a review from abnegate November 11, 2025 09:03
@loks0n loks0n merged commit a2799b1 into 1.8.x Nov 13, 2025
42 of 43 checks passed
@ChiragAgg5k ChiragAgg5k deleted the fix-nullable-validation branch November 14, 2025 08:22
This was referenced Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants