Bump utopia-php/http to 2.0.0-rc23 - #251
Merged
Merged
Conversation
The exact rc18 pin here is the ceiling for every consumer of the executor. Downstream, that pin holds utopia-php/validators at 0.3, which holds utopia-php/database at 7.1.1, which holds utopia-php/cache at 4.x — and cache 4.x will not take utopia-php/circuit-breaker 0.4. A patch release of the circuit breaker is unreachable from here until this moves. rc18 to rc23 adds no API: JSON bodies decode empty objects as stdClass rather than collapsing them to [], the Swoole telemetry gauges register on worker 0 instead of returning null from the callback (Prometheus 3.13 rejects an OTLP request carrying an instrument with no data points), and error-handler failures name their exception class. validators 0.3 to 0.5 is additive: a new Identifier and Phone validator, and an opt-in requireNonBlank on Text. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
rc23 decodes an empty JSON object to stdClass rather than collapsing it
to [], so `{}` stays distinguishable from `[]` in a request body. The
Assoc validator takes arrays only, so on rc18 `"variables": {}` was a
valid empty map and on rc23 it is a 400 — on POST /v1/runtimes
(variables) and on POST /v1/runtimes/:runtimeId/executions (variables
and headers, both AnyOf[Text, Assoc]).
No param here wants the distinction: the object-shaped ones are string
maps, and an empty map is an empty map however it was written. The
request hook flattens such an object back to [] before validation runs.
Only the payload is rewritten, and only when it held one, because a
query string cannot and writing one back as the payload would move it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Greptile SummaryThe PR upgrades
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (2): Last reviewed commit: "test: cover the empty-object map on runt..." | Re-trigger Greptile |
POST /v1/runtimes validates variables with Assoc, same as the execution route, so it regresses the same way and had no case. The runtime this test already creates carries the empty object, so the coverage is free. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Moves
utopia-php/httpfrom an exact2.0.0-rc18pin to2.0.0-rc23, and keeps the executor's map-shaped params accepting an empty JSON object.Why
The exact rc18 pin here is the ceiling for every consumer of the executor. Downstream that pin holds
utopia-php/validatorsat 0.3, which holdsutopia-php/databaseat 7.1.1, which holdsutopia-php/cacheat 4.x — and cache 4.x will not takeutopia-php/circuit-breaker0.4. A circuit breaker bump in Appwrite Edge is unreachable until this moves.What moves
httprc18 → rc23, and with itvalidators0.3.2 → 0.5.0,storage4.0.2 → 4.0.4,servers0.4.7 → 0.4.8.rc18 → rc23 adds no API. Three behavioural changes:
stdClassinstead of collapsing it to[], so{}stays distinguishable from[].validators0.3 → 0.5 is additive: newIdentifierandPhonevalidators, and an opt-inrequireNonBlankonText.The one real break, and the fix
The first of those is a contract change for this API.
Assoc::isValidtakes arrays only, so a body carrying"variables": {}validated on rc18 and 400s on rc23. It reaches three params:POST /v1/runtimes—variables(Assoc)POST /v1/runtimes/:runtimeId/executions—variablesandheaders(AnyOf[Text, Assoc])No param here wants the
{}vs[]distinction — the object-shaped ones are string maps, and an empty map is an empty map however it was written. The request hook inapp/http.phpflattens an empty object back to[]before validation runs. Only the payload is rewritten, and only when it actually held one: a query string cannot contain such an object, and writing one back as the payload would move it.Verified against the vendored rc23 that every shape accepted on rc18 —
{},{"A":"b"},[], a string — is accepted again.Testing
composer analyze,format:check,refactor:checkandtest:unit(35/35) all pass.The e2e suite has not been run — no Docker on the machine this was prepared on, so CI is the first real run.
testExecutegains one execution withvariablesandheadersas empty objects, which is the case that regresses without the hook.🤖 Generated with Claude Code