8000 refactor: Replace usage of utopia injection with route by HarshMN2345 · Pull Request #11435 · appwrite/appwrite · GitHub
[go: up one dir, main page]

Skip to content

refactor: Replace usage of utopia injection with route#11435

Open
HarshMN2345 wants to merge 21 commits into1.8.xfrom
refactor-SER-1095-replace-usage-of-utopia-injection
Open

refactor: Replace usage of utopia injection with route#11435
HarshMN2345 wants to merge 21 commits into1.8.xfrom
refactor-SER-1095-replace-usage-of-utopia-injection

Conversation

@HarshMN2345
Copy link
Member
@HarshMN2345 HarshMN2345 commented Mar 3, 2026

What does this PR do?

(Provide a description of what this PR does and why it's needed.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)

Related PRs and Issues

  • (Related PR or issue)

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@coderabbitai
Copy link
Contributor
coderabbitai bot commented Mar 3, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Replaces injected Http $utopia with Route $route across routing, init, shutdown, action, and resource handlers and adds use Utopia\Http\Route where required. Removes local calls to $utopia->getRoute() / $utopia->match($request) and uses the injected $route directly, including in router labeling and error/telemetry callbacks. Updates injection tokens from 'utopia' to 'route' on Http registrations. Additionally, adds JSON-body parsing for empty GraphQL queries and normalizes x-sdk-graphql payloads in GraphQL endpoints.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description only contains an unfilled contribution template without any actual description of changes, rationale, or test plan. Complete the PR description by explaining what changes were made, why they improve the codebase, and how the changes were tested.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main refactoring objective: replacing utopia injection with route injection across multiple controller files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor-SER-1095-replace-usage-of-utopia-injection

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
github-actions bot commented Mar 3, 2026

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
imagemagick 7.1.2.13-r0 CVE-2026-25897 CRITICAL
imagemagick 7.1.2.13-r0 CVE-2026-25898 CRITICAL
imagemagick 7.1.2.13-r0 CVE-2026-25968 CRITICAL
imagemagick 7.1.2.13-r0 CVE-2026-25971 CRITICAL
imagemagick 7.1.2.13-r0 CVE-2026-25983 CRITICAL
imagemagick 7.1.2.13-r0 CVE-2026-25986 CRITICAL
imagemagick 7.1.2.13-r0 CVE-2026-25987 CRITICAL
imagemagick 7.1.2.13-r0 CVE-2026-26284 CRITICAL
imagemagick 7.1.2.13-r0 CVE-2026-24481 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-24485 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25794 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25795 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25796 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25798 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25799 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25965 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25966 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25967 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25969 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25970 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25985 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25988 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-25989 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-26066 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-26283 HIGH
imagemagick 7.1.2.13-r0 CVE-2026-27798 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25897 CRITICAL
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25898 CRITICAL
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25968 CRITICAL
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25971 CRITICAL
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25983 CRITICAL
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25986 CRITICAL
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25987 CRITICAL
imagemagick-c++ 7.1.2.13-r0 CVE-2026-26284 CRITICAL
imagemagick-c++ 7.1.2.13-r0 CVE-2026-24481 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-24485 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25794 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25795 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25796 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25798 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25799 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25965 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25966 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25967 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25969 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25970 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25985 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25988 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-25989 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-26066 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-26283 HIGH
imagemagick-c++ 7.1.2.13-r0 CVE-2026-27798 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25897 CRITICAL
imagemagick-dev 7.1.2.13-r0 CVE-2026-25898 CRITICAL
imagemagick-dev 7.1.2.13-r0 CVE-2026-25968 CRITICAL
imagemagick-dev 7.1.2.13-r0 CVE-2026-25971 CRITICAL
imagemagick-dev 7.1.2.13-r0 CVE-2026-25983 CRITICAL
imagemagick-dev 7.1.2.13-r0 CVE-2026-25986 CRITICAL
imagemagick-dev 7.1.2.13-r0 CVE-2026-25987 CRITICAL
imagemagick-dev 7.1.2.13-r0 CVE-2026-26284 CRITICAL
imagemagick-dev 7.1.2.13-r0 CVE-2026-24481 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-24485 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25794 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25795 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25796 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25798 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25799 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25965 HIGH
imagemagick-dev 7.1.2.13-r0< 8000 /td> CVE-2026-25966 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25967 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25969 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25970 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25985 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25988 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-25989 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-26066 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-26283 HIGH
imagemagick-dev 7.1.2.13-r0 CVE-2026-27798 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25897 CRITICAL
imagemagick-heic 7.1.2.13-r0 CVE-2026-25898 CRITICAL
imagemagick-heic 7.1.2.13-r0 CVE-2026-25968 CRITICAL
imagemagick-heic 7.1.2.13-r0 CVE-2026-25971 CRITICAL
imagemagick-heic 7.1.2.13-r0 CVE-2026-25983 CRITICAL
imagemagick-heic 7.1.2.13-r0 CVE-2026-25986 CRITICAL
imagemagick-heic 7.1.2.13-r0 CVE-2026-25987 CRITICAL
imagemagick-heic 7.1.2.13-r0 CVE-2026-26284 CRITICAL
imagemagick-heic 7.1.2.13-r0 CVE-2026-24481 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-24485 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25794 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25795 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25796 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25798 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25799 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25965 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25966 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25967 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25969 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25970 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25985 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25988 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-25989 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-26066 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-26283 HIGH
imagemagick-heic 7.1.2.13-r0 CVE-2026-27798 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25897 CRITICAL
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25898 CRITICAL
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25968 CRITICAL
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25971 CRITICAL
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25983 CRITICAL
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25986 CRITICAL
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25987 CRITICAL
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-26284 CRITICAL
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-24481 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-24485 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25794 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25795 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25796 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25798 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25799 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25965 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25966 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25967 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25969 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25970 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25985 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25988 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-25989 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-26066 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-26283 HIGH
imagemagick-jpeg 7.1.2.13-r0 CVE-2026-27798 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25897 CRITICAL
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25898 CRITICAL
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25968 CRITICAL
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25971 CRITICAL
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25983 CRITICAL
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25986 CRITICAL
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25987 CRITICAL
imagemagick-jxl 7.1.2.13-r0 CVE-2026-26284 CRITICAL
imagemagick-jxl 7.1.2.13-r0 CVE-2026-24481 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-24485 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25794 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25795 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25796 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25798 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25799 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25965 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25966 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25967 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25969 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25970 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25985 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25988 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-25989 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-26066 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-26283 HIGH
imagemagick-jxl 7.1.2.13-r0 CVE-2026-27798 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25897 CRITICAL
imagemagick-libs 7.1.2.13-r0 CVE-2026-25898 CRITICAL
imagemagick-libs 7.1.2.13-r0 CVE-2026-25968 CRITICAL
imagemagick-libs 7.1.2.13-r0 CVE-2026-25971 CRITICAL
imagemagick-libs 7.1.2.13-r0 CVE-2026-25983 CRITICAL
imagemagick-libs 7.1.2.13-r0 CVE-2026-25986 CRITICAL
imagemagick-libs 7.1.2.13-r0 CVE-2026-25987 CRITICAL
imagemagick-libs 7.1.2.13-r0 CVE-2026-26284 CRITICAL
imagemagick-libs 7.1.2.13-r0 CVE-2026-24481 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-24485 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25794 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25795 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25796 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25798 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25799 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25965 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25966 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25967 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25969 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25970 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25985 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25988 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-25989 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-26066 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-26283 HIGH
imagemagick-libs 7.1.2.13-r0 CVE-2026-27798 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25897 CRITICAL
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25898 CRITICAL
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25968 CRITICAL
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25971 CRITICAL
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25983 CRITICAL
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25986 CRITICAL
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25987 CRITICAL
imagemagick-tiff 7.1.2.13-r0 CVE-2026-26284 CRITICAL
imagemagick-tiff 7.1.2.13-r0 CVE-2026-24481 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-24485 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25794 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25795 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25796 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25798 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25799 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25965 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25966 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25967 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25969 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25970 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25985 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25988 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-25989 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-26066 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-26283 HIGH
imagemagick-tiff 7.1.2.13-r0 CVE-2026-27798 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25897 CRITICAL
imagemagick-webp 7.1.2.13-r0 CVE-2026-25898 CRITICAL
imagemagick-webp 7.1.2.13-r0 CVE-2026-25968 CRITICAL
imagemagick-webp 7.1.2.13-r0 CVE-2026-25971 CRITICAL
imagemagick-webp 7.1.2.13-r0 CVE-2026-25983 CRITICAL
imagemagick-webp 7.1.2.13-r0 CVE-2026-25986 CRITICAL
imagemagick-webp 7.1.2.13-r0 CVE-2026-25987 CRITICAL
imagemagick-webp 7.1.2.13-r0 CVE-2026-26284 CRITICAL
imagemagick-webp 7.1.2.13-r0 CVE-2026-24481 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-24485 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25794 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25795 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25796 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25798 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25799 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25965 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25966 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25967 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25969 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25970 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25985 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25988 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-25989 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-26066 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-26283 HIGH
imagemagick-webp 7.1.2.13-r0 CVE-2026-27798 HIGH
libecpg 18.1-r0 CVE-2026-2004 HIGH
libecpg 18.1-r0 CVE-2026-2005 HIGH
libecpg 18.1-r0 CVE-2026-2006 HIGH
libecpg 18.1-r0 CVE-2026-2007 HIGH
libecpg-dev 18.1-r0 CVE-2026-2004 HIGH
libecpg-dev 18.1-r0 CVE-2026-2005 HIGH
libecpg-dev 18.1-r0 CVE-2026-2006 HIGH
libecpg-dev 18.1-r0 CVE-2026-2007 HIGH
libheif 1.20.2-r1 CVE-2025-68431 HIGH
libpng 1.6.54-r0 CVE-2026-25646 HIGH
libpng-dev 1.6.54-r0 CVE-2026-25646 HIGH
libpq 18.1-r0 CVE-2026-2004 HIGH
libpq 18.1-r0 CVE-2026-2005 HIGH
libpq 18.1-r0 CVE-2026-2006 HIGH
libpq 18.1-r0 CVE-2026-2007 HIGH
libpq-dev 18.1-r0 CVE-2026-2004 HIGH
libpq-dev 18.1-r0 CVE-2026-2005 HIGH
libpq-dev 18.1-r0 CVE-2026-2006 HIGH
libpq-dev 18.1-r0 CVE-2026-2007 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2004 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2005 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2006 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2007 HIGH
zlib 1.3.1-r2 CVE-2026-22184 CRITICAL
zlib-dev 1.3.1-r2 CVE-2026-22184 CRITICAL

Source Code Scan Results

🎉 No vulnerabilities found!

@github-actions
Copy link
github-actions bot commented Mar 3, 2026

🔄 PHP-Retry Summary

Flaky tests detected across commits:

Commit 54737dd - 2 flaky tests
Test Retries Total Time Details
UsageTest::testDatabaseStatsCollectionsAPI 1 10.29s Logs
LegacyTransactionsConsoleClientTest::testBulkUpdateOperations 1 240.31s Logs
Commit 3f0a341 - 3 flaky tests
Test Retries Total Time Details
UsageTest::testDatabaseStatsCollectionsAPI 1 10.27s Logs
LegacyCustomServerTest::testSpatialQuery 1 240.55s Logs
TablesDBConsoleClientTest::testSpatialQuery 1 240.52s Logs
Commit 03aa85b - 3 flaky tests
Test Retries Total Time Details
UsageTest::testDatabaseStatsCollectionsAPI 1 10.31s Logs
RealtimeCustomClientQueryTest::testDatabaseChannelWithQuery 1 46.48s Logs
RealtimeCustomClientTest::testChannelTablesDBRowUpdate 1 644ms Logs
Commit 3dacb1e - 9 flaky tests
Test Retries Total Time Details
UsageTest::testDatabaseStatsCollectionsAPI 1 10.27s Logs
LegacyCustomClientTest::testOrQueries 1 240.28s Logs
LegacyCustomServerTest::testInvalidDocumentStructure 1 240.97s Logs
LegacyCustomServerTest::testNotStartsWith 1 241.20s Logs
TablesDBCustomServerTest::testCreateIndexes 1 241.14s Logs
TablesDBTransactionsConsoleClientTest::testUpdateDocument 1 241.01s Logs
TablesDBTransactionsCustomClientTest::testBulkUpsert 1 240.52s Logs
TablesDBTransactionsCustomServerTest::testRollback 1 240.71s Logs
TablesDBTransactionsCustomServerTest::testCrossAPIIncrementDecrement 1 240.72s Logs
Commit 836c4f2 - 4 flaky tests
Test Retries Total Time Details
UsageTest::testDatabaseStatsCollectionsAPI 1 10.26s Logs
TablesDBConsoleClientTest::testNotContains 1 240.40s Logs
TablesDBCustomServerTest::testCreateIndexes 1 241.13s Logs
LegacyTransactionsConsoleClientTest::testBulkUpsert 1 240.23s Logs

Note: Flaky test results are tracked for the last 5 commits

@github-actions
Copy link
github-actions bot commented Mar 3, 2026

✨ Benchmark results

  • Requests per second: 1,712
  • Requests with 200 status code: 308,161
  • P99 latency: 0.099122275

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,712 1,189
200 308,161 214,058
P99 0.099122275 0.190023835

Copy link
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.

Caution

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

⚠️ Outside diff range comments (1)
app/init/resources.php (1)

1268-1307: ⚠️ Potential issue | 🔴 Critical

Injection token mismatch: 'utopia' should be 'route'.

The function signature expects Route $route, but the injection array on line 1307 still specifies 'utopia'. This will cause a runtime error when the resource is resolved.

🐛 Proposed fix
-}, ['project', 'dbForPlatform', 'utopia', 'request', 'authorization']);
+}, ['project', 'dbForPlatform', 'route', 'request', 'authorization']);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/init/resources.php` around lines 1268 - 1307, The resource registered
with Http::setResource declares a parameter Route $route but the injection array
still contains the wrong token 'utopia', causing a mismatch at resolution;
update the injection tokens for this resource so they match the function
signature by replacing 'utopia' with 'route' in the array passed as the third
argument to Http::setResource so the container injects Route $route correctly
(ensure the rest of tokens: 'project', 'dbForPlatform', 'request',
'authorization' remain in the same order).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@app/init/resources.php`:
- Around line 1268-1307: The resource registered with Http::setResource declares
a parameter Route $route but the injection array still contains the wrong token
'utopia', causing a mismatch at resolution; update the injection tokens for this
resource so they match the function signature by replacing 'utopia' with 'route'
in the array passed as the third argument to Http::setResource so the container
injects Route $route correctly (ensure the rest of tokens: 'project',
'dbForPlatform', 'request', 'authorization' remain in the same order).

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 598c71f and ce5fe2c.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • app/controllers/general.php
  • app/controllers/mock.php
  • app/controllers/shared/api.php
  • app/controllers/shared/api/auth.php
  • app/init/resources.php

Copy link
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.

🧹 Nitpick comments (2)
app/controllers/api/graphql.php (2)

120-126: Consider providing explicit error feedback for malformed JSON.

When json_decode fails on an invalid JSON payload, the code silently continues with an empty $query, which will eventually throw GRAPHQL_NO_QUERY. This could confuse users who sent malformed JSON but receive a "no query" error instead of a JSON parsing error.

♻️ Proposed improvement for better error handling
 if (empty($query) && \str_starts_with($type, 'application/json')) {
     $rawPayload = $request->getRawPayload();
     $decoded = \json_decode($rawPayload, true);
-    if (\is_array($decoded)) {
+    if ($decoded === null && \json_last_error() !== JSON_ERROR_NONE && !empty($rawPayload)) {
+        throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Invalid JSON payload: ' . \json_last_error_msg());
+    }
+    if (\is_array($decoded)) {
         $query = $decoded;
     }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/controllers/api/graphql.php` around lines 120 - 126, The code silently
ignores json_decode failures causing malformed JSON to surface as
GRAPHQL_NO_QUERY; update the block handling $rawPayload/$decoded to detect
json_decode errors (use json_last_error() / json_last_error_msg()) when
$rawPayload is non-empty and $decoded is not an array, and return or throw a
clear client error (e.g., a 400 response or a specific exception/message
indicating malformed JSON) referencing the same $query/$rawPayload variables so
callers get an explicit "malformed JSON" error instead of GRAPHQL_NO_QUERY.

176-184: Duplicated JSON parsing logic could be extracted into a helper function.

This JSON body parsing block (lines 178-184) is identical to lines 120-126 in the mutation endpoint. Consider extracting this into a shared helper function similar to parseGraphql() and parseMultipart() to reduce duplication and centralize the logic.

♻️ Proposed helper function

Add a helper function:

/**
 * Parse a JSON request body when query params are empty
 *
 * `@param` array $query
 * `@param` Request $request
 * `@return` array
 */
function parseJsonBody(array $query, Request $request): array
{
    $type = $request->getHeader('content-type', '');
    
    if (empty($query) && \str_starts_with($type, 'application/json')) {
        $rawPayload = $request->getRawPayload();
        $decoded = \json_decode($rawPayload, true);
        if (\is_array($decoded)) {
            return $decoded;
        }
    }
    
    return $query;
}

Then use in both endpoints:

 $query = $request->getParams();
-$type = $request->getHeader('content-type', '');
-
-if (empty($query) && \str_starts_with($type, 'application/json')) {
-    $rawPayload = $request->getRawPayload();
-    $decoded = \json_decode($rawPayload, true);
-    if (\is_array($decoded)) {
-        $query = $decoded;
-    }
-}
+$query = parseJsonBody($query, $request);
+$type = $request->getHeader('content-type', '');
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/controllers/api/graphql.php` around lines 176 - 184, Extract the
duplicated JSON body parsing into a shared helper named parseJsonBody(array
$query, Request $request): array and replace the inlined blocks in both the
GraphQL query handler and the mutation endpoint with calls to
parseJsonBody($query, $request); the helper should check the Content-Type header
with str_starts_with($type, 'application/json'), json_decode the raw payload via
$request->getRawPayload(), return the decoded array if is_array($decoded) or the
original $query otherwise, and be used alongside existing parseGraphql() and
parseMultipart() flows to centralize logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/controllers/api/graphql.php`:
- Around line 120-126: The code silently ignores json_decode failures causing
malformed JSON to surface as GRAPHQL_NO_QUERY; update the block handling
$rawPayload/$decoded to detect json_decode errors (use json_last_error() /
json_last_error_msg()) when $rawPayload is non-empty and $decoded is not an
array, and return or throw a clear client error (e.g., a 400 response or a
specific exception/message indicating malformed JSON) referencing the same
$query/$rawPayload variables so callers get an explicit "malformed JSON" error
instead of GRAPHQL_NO_QUERY.
- Around line 176-184: Extract the duplicated JSON body parsing into a shared
helper named parseJsonBody(array $query, Request $request): array and replace
the inlined blocks in both the GraphQL query handler and the mutation endpoint
with calls to parseJsonBody($query, $request); the helper should check the
Content-Type header with str_starts_with($type, 'application/json'), json_decode
the raw payload via $request->getRawPayload(), return the decoded array if
is_array($decoded) or the original $query otherwise, and be used alongside
existing parseGraphql() and parseMultipart() flows to centralize logic.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0e0b6c6 and 62c2d41.

📒 Files selected for processing (1)
  • app/controllers/api/graphql.php

Copy link
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 PR refactors request-context access by replacing utopia injection usage (and related match()/getRoute() calls) with direct route injection across HTTP controllers/resources, alongside dependency lockfile updates and improved GraphQL request payload parsing for JSON bodies.

Changes:

  • Replace utopia injection with route injection in multiple init/shutdown handlers and resources.
  • Update GraphQL POST handlers to fall back to decoding raw JSON payload when params are empty.
  • Bump several dependencies in composer.lock (Symfony, Utopia packages, phpstan, etc.).

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
composer.lock Updates locked dependency versions and composer lock metadata.
app/init/resources.php Updates team resource to depend on injected Route instead of matching via Http.
app/controllers/shared/api/auth.php Switches auth init middleware from utopia-based route matching to injected Route.
app/controllers/shared/api.php Switches API init/shutdown handlers to injected Route and removes redundant route matching calls.
app/controllers/mock.php Uses injected Route in mock shutdown handler instead of utopia->getRoute().
app/controllers/general.php Injects Route into init/options/error handlers and replaces utopia->getRoute() usage.
app/controllers/api/graphql.php Adds JSON raw-payload decode fallback; adjusts x-sdk-graphql query extraction timing.
Comments suppressed due to low confidence (1)

app/controllers/general.php:920

  • This if ($route === null) block is unreachable with the current Route $route type-hint (and would be a TypeError before reaching here if null were injected). Either make $route nullable (?Route) or remove this null handling and ensure a route is always available at this point.
        if ($route === null) {
            return $response
                ->setStatusCode(404)
                ->send('Not Found');

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

->inject('devKey')
->inject('authorization')
->action(function (Throwable $error, Http $utopia, Request $request, Response $response, Document $project, ?Logger $logger, Log $log, StatsUsage $queueForStatsUsage, Document $devKey, Authorization $authorization) {
->action(function (Throwable $error, Http $utopia, Request $request, Route $route, Response $response, Document $project, ?Logger $logger, Log $log, StatsUsage $queueForStatsUsage, Document $devKey, Authorization $authorization) {
Copy link
Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to de 7D4E scribe this comment to others. Learn more.

This error handler receives $route as non-nullable Route, but later uses $route?->... and checks $route === null. To avoid dead code and potential TypeError when handling unmatched routes/errors, consider changing the parameter type to ?Route (and keep nullsafe usage) or remove the null checks if route is guaranteed.

Suggested change
->action(function (Throwable $error, Http $utopia, Request $request, Route $route, Response $response, Document $project, ?Logger $logger, Log $log, StatsUsage $queueForStatsUsage, Document $devKey, Authorization $authorization) {
->action(function (Throwable $error, Http $utopia, Request $request, ?Route $route, Response $response, Document $project, ?Logger $logger, Log $log, StatsUsage $queueForStatsUsage, Document $devKey, Authorization $authorization) {

Copilot uses AI. Check for mistakes.
} else {
$route = $utopia->match($request);
$path = !empty($route) ? $route->getPath() : $request->getURI();
$path = $route->getPath() ?? $request->getURI();
Copy link
Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Previously this logic handled the case where route matching returned no route; now it assumes $route is always present. If route can be missing for some requests, $route->getPath() will throw. Consider making the injected parameter ?Route and using $route?->getPath() ?? $request->getURI() (and/or retaining the old match() fallback) to preserve the prior behavior.

Copilot uses AI. Check for mistakes.
$query = parseMultipart($query, $request);
}

if ($request->getHeader('x-sdk-graphql') == 'true' && isset($query['query'])) {
Copy link
Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

execute() is type-hinted to accept array $query, but this branch can replace $query with $query['query'] which may be a string depending on the request payload shape. If that happens, calling execute() will raise a TypeError. Consider validating that $query['query'] is an array (or wrapping it into the expected array shape) before reassigning.

Suggested change
if ($request->getHeader('x-sdk-graphql') == 'true' && isset($query['query'])) {
if ($request->getHeader('x-sdk-graphql') == 'true' && isset($query['query']) && \is_array($query['query'])) {

Copilot uses AI. Check for mistakes.
}

if ($request->getHeader('x-sdk-graphql') == 'true' && isset($query['query'])) {
$query = $query['query'];
Copy link
Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Same as above: execute() requires an array, but $query = $query['query'] can turn $query into a string if the decoded payload uses a plain query string. Guard for array shape (or normalize into the expected {query, variables, operationName} structure) before calling execute().

Suggested change
$query = $query['query'];
if (\is_array($query['query'])) {
// If the SDK wrapped the full GraphQL payload in a "query" field, unwrap it.
$query = $query['query'];
} else {
// If the SDK sent a plain query string, normalize into the expected structure.
$normalized = [
'query' => $query['query'],
];
if (isset($query['variables'])) {
$normalized['variables'] = $query['variables'];
}
if (isset($query['operationName'])) {
$normalized['operationName'] = $query['operationName'];
}
$query = $normalized;
}

Copilot uses AI. Check for mistakes.
->inject('queueForDeletes')
->inject('executionsRetentionCount')
->action(function (Http $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Log $log, Document $project, Database $dbForPlatform, callable $getProjectDB, Locale $locale, array $localeCodes, Reader $geodb, StatsUsage $queueForStatsUsage, Event $queueForEvents, Execution $queueForExecutions, Executor $executor, array $platform, callable $isResourceBlocked, string $previewHostname, Document $devKey, ?Key $apiKey, Cors $cors, Authorization $authorization, DeleteEvent $queueForDeletes, int $executionsRetentionCount) {
->action(function (Http $utopia, SwooleRequest $swooleRequest, Request $request, Route $route, Response $response, Log $log, Document $project, Database $dbForPlatform, callable $getProjectDB, Locale $locale, array $localeCodes, Reader $geodb, StatsUsage $queueForStatsUsage, Event $queueForEvents, Execution $queueForExecutions, Executor $executor, array $platform, callable $isResourceBlocked, string $previewHostname, Document $devKey, ?Key $apiKey, Cors $cors, Authorization $authorization, DeleteEvent $queueForDeletes, int $executionsRetentionCount) {
Copy link
Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

$route is type-hinted as non-nullable Route, but this handler later treats it as nullable (null check + nullsafe usage). If the injector can provide null, this will crash with a TypeError; otherwise the null-handling becomes dead code. Consider changing the parameter to ?Route and using nullsafe access, or remove the null-handling if a route is guaranteed here.

Copilot uses AI. Check for mistakes.
Copy link
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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/init/resources.php`:
- Around line 1269-1274: In the Http::setResource('team') callback there is a
potential null dereference calling $route->getPath(); update the call to guard
against a null $route by using the null-safe operator on the $route before
calling getPath (i.e., use $route?->getPath() with the existing fallback to
$request->getURI()), or alternatively ensure and document that the Route
injection can never be null—prefer the null-safe change for $route and getPath
to prevent fatal errors during error/early-exit flows.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 752c2c8e-1ec8-4c23-a77e-69c9f88cfd17

📥 Commits

Reviewing files that changed from the base of the PR and between 62c2d41 and 6e53e6a.

📒 Files selected for processing (3)
  • app/controllers/general.php
  • app/controllers/shared/api.php
  • app/init/resources.php

@HarshMN2345 HarshMN2345 requested a review from loks0n March 10, 2026 08:09