Skip to content

Feat: Param aliases#252

Open
Meldiron wants to merge 4 commits intomainfrom
feat-param-aliases
Open

Feat: Param aliases#252
Meldiron wants to merge 4 commits intomainfrom
feat-param-aliases

Conversation

@Meldiron
Copy link
Copy Markdown
Contributor

@Meldiron Meldiron commented May 4, 2026

No description provided.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 4, 2026

Greptile Summary

This PR adds param-alias support to getArguments() in Http.php, allowing a canonical param key to be satisfied by one or more alias keys from both request params and URL path values. The implementation is logically correct and the new test suite covers the main scenarios (GET, POST, required/optional, validation, and URL path alias resolution).

Confidence Score: 4/5

Safe to merge once the dev-branch dependency on utopia-php/servers is replaced with a stable release tag

No P0/P1 bugs found in the logic; the only open issue is the known dev-branch composer dependency already flagged in a previous thread. Score is capped at 4 as a reminder that the unstable dependency needs resolving before this lands on main.

composer.json and composer.lock — dev-branch dependency on utopia-php/servers must be updated to a stable release before merging

Important Files Changed

Filename Overview
src/Http/Http.php Adds alias resolution for both $requestParams and $values in getArguments(); logic is correct but the two nearly-identical alias-lookup loops are duplicated code
tests/HttpTest.php Comprehensive test coverage for alias resolution across GET/POST params, required/optional params, validation, and URL path params; state is properly isolated via the class-level setUp/tearDown
composer.json Pins utopia-php/servers to an unreleased feature branch (dev-feat-param-aliases as 0.3.x-dev); needs a stable tag before merging to main
composer.lock Lock file updated to point to the feat-param-aliases branch commit; stability-flags set to 20 (dev) for utopia-php/servers, deviating from the project's minimum-stability: stable

Reviews (2): Last reviewed commit: "fix url param aliases" | Re-trigger Greptile

Comment thread composer.json
"php": ">=8.3",
"utopia-php/di": "0.3.*",
"utopia-php/servers": "0.3.*",
"utopia-php/servers": "dev-feat-param-aliases as 0.3.x-dev",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Dev-branch dependency not suitable for merge to main

utopia-php/servers is pinned to dev-feat-param-aliases as 0.3.x-dev, a feature branch that hasn't been released yet. This also forces stability-flags for that package to 20 (dev) in composer.lock, deviating from the project's minimum-stability: stable. If merged as-is, any composer install on a fresh clone will pull an unversioned, potentially changing branch rather than a pinned release, making builds non-reproducible. This constraint should be updated to a stable release tag (e.g. 0.3.*) once the aliases support in utopia-php/servers is released.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

k6 benchmark

Throughput Requests Fail rate p50 p95
5710 req/s 399779 0% 7.13 ms 15.38 ms

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