X Tutup
Skip to content

Fix V21 backward compat filter, remove outdated comment, patch phpunit CVE#11446

Draft
Copilot wants to merge 3 commits intofeat-1.8.x-new-schemafrom
copilot/sub-pr-10862
Draft

Fix V21 backward compat filter, remove outdated comment, patch phpunit CVE#11446
Copilot wants to merge 3 commits intofeat-1.8.x-new-schemafrom
copilot/sub-pr-10862

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Three fixes for the schema-change PR:

V21 response filter backward compatibility

The V21 response filter was not stripping the two new fields introduced in this PR when downgrading responses to the 1.8 format, causing unexpected fields to appear for older SDK clients:

  • deploymentRetention — removed from both function and site responses (via parseSpecs)
  • startCommand — removed from site responses only (via parseSite), as it doesn't exist in the 1.8 Site model
protected function parseSite(array $content): array
{
    $content = $this->parseSpecs($content);
    unset($content['startCommand']);   // new
    return $content;
}

protected function parseSpecs(array $content): array
{
    $content['specification'] = $content['buildSpecification'] ?? null;
    unset($content['buildSpecification']);
    unset($content['runtimeSpecification']);
    unset($content['deploymentRetention']);  // new
    return $content;
}

Unit tests added in tests/unit/Utopia/Response/Filters/V21Test.php covering function, function list, site, and site list transformations.

Outdated comment removed

app/config/collections/projects.php still had // At the moment, always empty (no runtime supports it yet) on the startCommand schema field — removed, since the field is now actively used.

phpunit CVE patch

composer.lock pinned phpunit/phpunit at 9.6.31, which is affected by CVE: Unsafe Deserialization in PHPT Code Coverage Handling (>= 9.0.0, < 9.6.33). Bumped to 9.6.33 (patched release) — version, git ref, dist URL, and support URL updated in the lock file.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits March 4, 2026 13:22
Co-authored-by: Meldiron <19310830+Meldiron@users.noreply.github.com>
…e deserialization)

Co-authored-by: Meldiron <19310830+Meldiron@users.noreply.github.com>
Copilot AI changed the title [WIP] Add schema changes for multiple features Fix V21 backward compat filter, remove outdated comment, patch phpunit CVE Mar 4, 2026
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.

2 participants

X Tutup